Pyrogenesis  13997
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | List of all members
CShaderUniforms Class Reference

Represents a mapping of name strings to value CVector4Ds, for use with uniforms in shaders. More...

#include <ShaderDefines.h>

Inheritance diagram for CShaderUniforms:
CShaderParams< CVector4D >

Public Member Functions

void Add (const char *name, const CVector4D &value)
 Add a name and associated value to the map of uniforms. More...
 
CVector4D GetVector (const char *name) const
 Return the value for the given name, or (0,0,0,0) if not defined. More...
 
void BindUniforms (const CShaderProgramPtr &shader) const
 Bind the collection of uniforms onto the given shader. More...
 
- Public Member Functions inherited from CShaderParams< CVector4D >
 CShaderParams ()
 Create an empty map of defines. More...
 
void Set (CStrIntern name, const CVector4D &value)
 Add a name and associated value to the map of parameters. More...
 
void SetMany (const CShaderParams &params)
 Add all the names and values from another set of parameters. More...
 
std::map< CStrIntern, CVector4DGetMap () const
 Return a copy of the current name/value mapping. More...
 
size_t GetHash () const
 Return a hash of the current mapping. More...
 
bool operator< (const CShaderParams &b) const
 Compare with some arbitrary total order. More...
 
bool operator== (const CShaderParams &b) const
 Fast equality comparison. More...
 
bool operator!= (const CShaderParams &b) const
 Fast inequality comparison. More...
 

Additional Inherited Members

- Protected Attributes inherited from CShaderParams< CVector4D >
SItems * m_Items
 

Detailed Description

Represents a mapping of name strings to value CVector4Ds, for use with uniforms in shaders.

Not thread-safe - must only be used from the main thread.

Definition at line 154 of file ShaderDefines.h.

Member Function Documentation

void CShaderUniforms::Add ( const char *  name,
const CVector4D value 
)

Add a name and associated value to the map of uniforms.

If the name is already defined, its value will be replaced.

Definition at line 216 of file ShaderDefines.cpp.

void CShaderUniforms::BindUniforms ( const CShaderProgramPtr shader) const

Bind the collection of uniforms onto the given shader.

Definition at line 234 of file ShaderDefines.cpp.

CVector4D CShaderUniforms::GetVector ( const char *  name) const

Return the value for the given name, or (0,0,0,0) if not defined.

Definition at line 221 of file ShaderDefines.cpp.


The documentation for this class was generated from the following files: