18 #ifndef ION_GFX_ATTRIBUTE_H_
19 #define ION_GFX_ATTRIBUTE_H_
23 #include "base/integral_types.h"
51 typedef base::Variant<float, math::VectorBase2f, math::VectorBase3f,
56 public ShaderInput<AttributeValueType, AttributeType> {
68 static const char* GetShaderInputTypeName();
71 static const char* GetValueTypeName(
const ValueType
type);
75 template <
typename T>
static ValueType GetTypeByValue();
92 return !(*
this == other);
97 void SetDivisor(
unsigned int divisor) { divisor_ = divisor; }
104 unsigned int divisor_;
110 #endif // ION_GFX_ATTRIBUTE_H_
Matrix< 4, float > Matrix4f
AttributeType
The AttributeType enum defines all supported attribute shader argument types.
base::Variant< float, math::VectorBase2f, math::VectorBase3f, math::VectorBase4f, math::Matrix2f, math::Matrix3f, math::Matrix4f, BufferObjectElement > AttributeValueType
Matrix< 3, float > Matrix3f
Structure for clients to use to encapsulate Elements.
void SetDivisor(unsigned int divisor)
The Variant class is similar to boost::variant.
static Tag GetTag()
Returns the tag for this input type.
unsigned int GetDivisor() const
Sets/Gets the attribute divisor.
Matrix< 2, float > Matrix2f
Dimension- and type-specific typedefs.
bool operator!=(const Attribute &other) const
Needed for Field::Set().
bool IsFixedPointNormalized() const
Checks and sets whether integer values should be mapped to the range [-1,1] (for signed values) or [0...
void SetFixedPointNormalized(bool normalize)
Attribute()
The default constructor creates an invalid Attribute instance, which should never be used as is...
bool operator==(const StlAllocator< T1 > &lhs, const StlAllocator< T2 > &rhs)
Each StlAllocator holds an Allocator.