public

Inheritance Graph

graph BT
	Uniform
	click Uniform "classRendering_1_1Uniform"

Description

Uniform

Classes

   
class Rendering::Uniform::UniformName

Public Types

   
   
enum dataType_t {UNIFORM_BOOL, UNIFORM_VEC2B, UNIFORM_VEC3B, UNIFORM_VEC4B, UNIFORM_FLOAT, UNIFORM_VEC2F, UNIFORM_VEC3F, UNIFORM_VEC4F, UNIFORM_INT, UNIFORM_VEC2I, UNIFORM_VEC3I, UNIFORM_VEC4I, UNIFORM_MATRIX_2X2F, UNIFORM_MATRIX_3X3F, UNIFORM_MATRIX_4X4F}

Public Static Attributes

   
   
const Uniform nullUniform

Public Static Functions

   
   
size_t getValueSize(const dataType_t t)
returns the size in bytes of a value of the given type

Public Functions

   
   
  Uniform()
   
  Uniform( UniformName _name, dataType_t _type, size_t arraySize)
   
  Uniform( UniformName _name, dataType_t _type, size_t arraySize, std::vector< uint8_t > data)
   
  Uniform( UniformName _name, dataType_t _type, const std::deque< bool > & values)
   
  Uniform( UniformName _name, dataType_t _type, const std::vector< float > & values)
   
  Uniform( UniformName _name, dataType_t _type, const std::vector< int32_t > & values)
   
  Uniform( UniformName _name, bool value)
UNIFORM_BOOL.
   
  Uniform( UniformName _name, const std::deque< bool > & values)
   
  Uniform( UniformName _name, float value)
UNIFORM_FLOAT.
   
  Uniform( UniformName _name, const std::vector< float > & values)
   
  Uniform( UniformName _name, const Geometry::Vec2 & value)
UNIFORM_VEC2F.
   
  Uniform( UniformName _name, const std::vector< Geometry::Vec2 > & values)
   
  Uniform( UniformName _name, const Geometry::Vec3 & value)
UNIFORM_VEC3F.
   
  Uniform( UniformName _name, const std::vector< Geometry::Vec3 > & values)
   
  Uniform( UniformName _name, const Geometry::Vec4 & value)
UNIFORM_VEC4F.
   
  Uniform( UniformName _name, const std::vector< Geometry::Vec4 > & values)
   
  Uniform( UniformName _name, const Util::Color4f & color)
   
  Uniform( UniformName _name, int32_t value)
UNIFORM_INT.
   
  Uniform( UniformName _name, const std::vector< int32_t > & values)
   
  Uniform( UniformName _name, const Geometry::Vec2i & value)
UNIFORM_VEC2I.
   
  Uniform( UniformName _name, const std::vector< Geometry::Vec2i > & values)
   
  Uniform( UniformName _name, const Geometry::Vec3i & value)
UNIFORM_VEC3I.
   
  Uniform( UniformName _name, const std::vector< Geometry::Vec3i > & values)
   
  Uniform( UniformName _name, const Geometry::Vec4i & value)
UNIFORM_VEC4I.
   
  Uniform( UniformName _name, const std::vector< Geometry::Vec4i > & values)
   
  Uniform( UniformName _name, const Geometry::Matrix3x3 & value)
UNIFORM_MATRIX_3X3F.
   
  Uniform( UniformName _name, const std::vector< Geometry::Matrix3x3 > & values)
   
  Uniform( UniformName _name, const Geometry::Matrix4x4 & value)
UNIFORM_MATRIX_4X4F.
   
  Uniform( UniformName _name, const std::vector< Geometry::Matrix4x4 > & values)
   
std::string toString() const
   
const std::string getName() const
   
Util::StringIdentifier getNameId() const
   
dataType_t getType() const
   
const uint8_t * getData() const
   
size_t getDataSize() const
   
size_t getNumValues() const
   
bool operator==(const Uniform & other) const
   
bool isNull() const

Documentation

enum
Rendering::Uniform::dataType_t

public
 
 
enum dataType_t
Enumerator   Description
Enumerator   Description
UNIFORM_BOOL = 0  
UNIFORM_VEC2B = 1  
UNIFORM_VEC3B = 2  
UNIFORM_VEC4B = 3  
UNIFORM_FLOAT = 4  
UNIFORM_VEC2F = 5  
UNIFORM_VEC3F = 6  
UNIFORM_VEC4F = 7  
UNIFORM_INT = 8  
UNIFORM_VEC2I = 9  
UNIFORM_VEC3I = 10  
UNIFORM_VEC4I = 11  
UNIFORM_MATRIX_2X2F = 12  
UNIFORM_MATRIX_3X3F = 13  
UNIFORM_MATRIX_4X4F = 14  

Note: if something is changed here, make sure that the dataSize-index is also updated.

Defined in Rendering/Shader/Uniform.h:68


variable
Rendering::Uniform::nullUniform

public static
 
 
const Uniform nullUniform

Defined in Rendering/Shader/Uniform.h:91


function
Rendering::Uniform::getValueSize

public static inline
     
     
size_t getValueSize( const dataType_t t )

returns the size in bytes of a value of the given type

Defined in Rendering/Shader/Uniform.h:76


function
Rendering::Uniform::Uniform

public
   
   
Uniform( )

Defined in Rendering/Shader/Uniform.h:93


function
Rendering::Uniform::Uniform

public
     
     
Uniform( UniformName _name,
  dataType_t _type,
  size_t arraySize
)    

Defined in Rendering/Shader/Uniform.h:94


function
Rendering::Uniform::Uniform

public
     
     
Uniform( UniformName _name,
  dataType_t _type,
  size_t arraySize,
  std::vector< uint8_t > data
)    

Defined in Rendering/Shader/Uniform.h:95


function
Rendering::Uniform::Uniform

public
     
     
Uniform( UniformName _name,
  dataType_t _type,
  const std::deque< bool > & values
)    

Generic bool-constructor (use another contructor whenever possible)

Exceptions

may
throw an invalid_argument-exception

Defined in Rendering/Shader/Uniform.h:99


function
Rendering::Uniform::Uniform

public
     
     
Uniform( UniformName _name,
  dataType_t _type,
  const std::vector< float > & values
)    

Generic float-constructor (use another contructor whenever possible)

Exceptions

may
throw an invalid_argument-exception

Defined in Rendering/Shader/Uniform.h:102


function
Rendering::Uniform::Uniform

public
     
     
Uniform( UniformName _name,
  dataType_t _type,
  const std::vector< int32_t > & values
)    

Generic int-constructor (use another contructor whenever possible)

Exceptions

may
throw an invalid_argument-exception

Defined in Rendering/Shader/Uniform.h:105


function
Rendering::Uniform::Uniform

public
     
     
Uniform( UniformName _name,
  bool value
)    

UNIFORM_BOOL.

Defined in Rendering/Shader/Uniform.h:108


function
Rendering::Uniform::Uniform

public
     
     
Uniform( UniformName _name,
  const std::deque< bool > & values
)    

Defined in Rendering/Shader/Uniform.h:109


function
Rendering::Uniform::Uniform

public
     
     
Uniform( UniformName _name,
  float value
)    

UNIFORM_FLOAT.

Defined in Rendering/Shader/Uniform.h:112


function
Rendering::Uniform::Uniform

public
     
     
Uniform( UniformName _name,
  const std::vector< float > & values
)    

Defined in Rendering/Shader/Uniform.h:113


function
Rendering::Uniform::Uniform

public
     
     
Uniform( UniformName _name,
  const Geometry::Vec2 & value
)    

UNIFORM_VEC2F.

Defined in Rendering/Shader/Uniform.h:116


function
Rendering::Uniform::Uniform

public
     
     
Uniform( UniformName _name,
  const std::vector< Geometry::Vec2 > & values
)    

Defined in Rendering/Shader/Uniform.h:117


function
Rendering::Uniform::Uniform

public
     
     
Uniform( UniformName _name,
  const Geometry::Vec3 & value
)    

UNIFORM_VEC3F.

Defined in Rendering/Shader/Uniform.h:120


function
Rendering::Uniform::Uniform

public
     
     
Uniform( UniformName _name,
  const std::vector< Geometry::Vec3 > & values
)    

Defined in Rendering/Shader/Uniform.h:121


function
Rendering::Uniform::Uniform

public
     
     
Uniform( UniformName _name,
  const Geometry::Vec4 & value
)    

UNIFORM_VEC4F.

Defined in Rendering/Shader/Uniform.h:124


function
Rendering::Uniform::Uniform

public
     
     
Uniform( UniformName _name,
  const std::vector< Geometry::Vec4 > & values
)    

Defined in Rendering/Shader/Uniform.h:125


function
Rendering::Uniform::Uniform

public
     
     
Uniform( UniformName _name,
  const Util::Color4f & color
)    

Defined in Rendering/Shader/Uniform.h:126


function
Rendering::Uniform::Uniform

public
     
     
Uniform( UniformName _name,
  int32_t value
)    

UNIFORM_INT.

Defined in Rendering/Shader/Uniform.h:129


function
Rendering::Uniform::Uniform

public
     
     
Uniform( UniformName _name,
  const std::vector< int32_t > & values
)    

Defined in Rendering/Shader/Uniform.h:130


function
Rendering::Uniform::Uniform

public
     
     
Uniform( UniformName _name,
  const Geometry::Vec2i & value
)    

UNIFORM_VEC2I.

Defined in Rendering/Shader/Uniform.h:133


function
Rendering::Uniform::Uniform

public
     
     
Uniform( UniformName _name,
  const std::vector< Geometry::Vec2i > & values
)    

Defined in Rendering/Shader/Uniform.h:134


function
Rendering::Uniform::Uniform

public
     
     
Uniform( UniformName _name,
  const Geometry::Vec3i & value
)    

UNIFORM_VEC3I.

Defined in Rendering/Shader/Uniform.h:137


function
Rendering::Uniform::Uniform

public
     
     
Uniform( UniformName _name,
  const std::vector< Geometry::Vec3i > & values
)    

Defined in Rendering/Shader/Uniform.h:138


function
Rendering::Uniform::Uniform

public
     
     
Uniform( UniformName _name,
  const Geometry::Vec4i & value
)    

UNIFORM_VEC4I.

Defined in Rendering/Shader/Uniform.h:141


function
Rendering::Uniform::Uniform

public
     
     
Uniform( UniformName _name,
  const std::vector< Geometry::Vec4i > & values
)    

Defined in Rendering/Shader/Uniform.h:142


function
Rendering::Uniform::Uniform

public
     
     
Uniform( UniformName _name,
  const Geometry::Matrix3x3 & value
)    

UNIFORM_MATRIX_3X3F.

Create a uniform containing a matrix.

Note: The matrix is transposed and stored in the uniform data.

Defined in Rendering/Shader/Uniform.h:149


function
Rendering::Uniform::Uniform

public
     
     
Uniform( UniformName _name,
  const std::vector< Geometry::Matrix3x3 > & values
)    

Defined in Rendering/Shader/Uniform.h:150


function
Rendering::Uniform::Uniform

public
     
     
Uniform( UniformName _name,
  const Geometry::Matrix4x4 & value
)    

UNIFORM_MATRIX_4X4F.

Defined in Rendering/Shader/Uniform.h:153


function
Rendering::Uniform::Uniform

public
     
     
Uniform( UniformName _name,
  const std::vector< Geometry::Matrix4x4 > & values
)    

Defined in Rendering/Shader/Uniform.h:154


function
Rendering::Uniform::toString

public const
   
   
std::string toString( ) const

Defined in Rendering/Shader/Uniform.h:157


function
Rendering::Uniform::getName

public const inline
   
   
const std::string getName( ) const

Defined in Rendering/Shader/Uniform.h:158


function
Rendering::Uniform::getNameId

public const inline
   
   
Util::StringIdentifier getNameId( ) const

Defined in Rendering/Shader/Uniform.h:159


function
Rendering::Uniform::getType

public const inline
   
   
dataType_t getType( ) const

Defined in Rendering/Shader/Uniform.h:160


function
Rendering::Uniform::getData

public const inline
   
   
const uint8_t * getData( ) const

Defined in Rendering/Shader/Uniform.h:161


function
Rendering::Uniform::getDataSize

public const inline
   
   
size_t getDataSize( ) const

Defined in Rendering/Shader/Uniform.h:162


function
Rendering::Uniform::getNumValues

public const inline
   
   
size_t getNumValues( ) const

Defined in Rendering/Shader/Uniform.h:164


function
Rendering::Uniform::operator==

public const inline
     
     
bool operator==( const Uniform & other ) const

Defined in Rendering/Shader/Uniform.h:165


function
Rendering::Uniform::isNull

public const inline
   
   
bool isNull( ) const

Defined in Rendering/Shader/Uniform.h:170