Ion: gfx/uniform.h Source File

1 

18 #ifndef ION_GFX_UNIFORM_H_

19 #define ION_GFX_UNIFORM_H_

20 

21 #include <limits>

22 

24 

25 #include "base/integral_types.h"

26 

32 

33 namespace ion {

34 namespace gfx {

35 

42 

46 

57 

62 };

63 

65  float, int, uint32,

66  math::VectorBase2f, math::VectorBase3f, math::VectorBase4f,

67  math::VectorBase2i, math::VectorBase3i, math::VectorBase4i,

68  math::VectorBase2ui, math::VectorBase3ui, math::VectorBase4ui,

71 

77  public:

83 

85  static const char* GetShaderInputTypeName();

86 

88  static const char* GetValueTypeName(const ValueType type);

89 

92  template <typename T> static ValueType GetTypeByValue();

93 

96 

100  void MergeValuesFrom(const Uniform& replacement);

101 

104  return !(*this == other);

105  }

106 

109  static bool GetMerged(

111 

112  private:

113  template <typename T> void MergeValuesInternal(const Uniform& other);

114 };

115 

116 }

117 }

118 

119 #endif // ION_GFX_UNIFORM_H_

Matrix< 4, float > Matrix4f

Uniform()

The default constructor creates an invalid Uniform instance, which should never be used as is...

Matrix< 3, float > Matrix3f

base::ReferentPtr< CubeMapTexture >::Type CubeMapTexturePtr

Convenience typedef for shared pointer to a CubeMapTexture.

base::Variant< float, int, uint32, math::VectorBase2f, math::VectorBase3f, math::VectorBase4f, math::VectorBase2i, math::VectorBase3i, math::VectorBase4i, math::VectorBase2ui, math::VectorBase3ui, math::VectorBase4ui, math::Matrix2f, math::Matrix3f, math::Matrix4f, CubeMapTexturePtr, TexturePtr > UniformValueType

A Uniform instance represents a uniform shader argument.

Tag

This is only used to determine the type of a ShaderInputRegistry::Spec since Attributes and Uniforms ...

bool operator!=(const Uniform &other) const

The Variant class is similar to boost::variant.

Matrix< 2, float > Matrix2f

Dimension- and type-specific typedefs.

static Tag GetTag()

Returns the tag for this input type.

A ShaderInput instance represents a general shader input.

bool operator==(const StlAllocator< T1 > &lhs, const StlAllocator< T2 > &rhs)

Each StlAllocator holds an Allocator.

UniformType

The UniformType enum defines all supported uniform shader argument types.