Pyrogenesis HEAD
Pyrogenesis, a RTS Engine
|
Represents a mapping of name strings to value CVector4Ds, for use with uniforms in shaders. More...
#include <ShaderDefines.h>
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 (Renderer::Backend::IDeviceCommandContext *deviceCommandContext, Renderer::Backend::IShaderProgram *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 ¶ms) |
Add all the names and values from another set of parameters. More... | |
std::map< CStrIntern, CVector4D > | GetMap () 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 |
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.
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.
void CShaderUniforms::BindUniforms | ( | Renderer::Backend::IDeviceCommandContext * | deviceCommandContext, |
Renderer::Backend::IShaderProgram * | shader | ||
) | const |
Bind the collection of uniforms onto the given shader.
CVector4D CShaderUniforms::GetVector | ( | const char * | name | ) | const |
Return the value for the given name, or (0,0,0,0) if not defined.