|
Pyrogenesis
13997
|
Represents a mapping of name strings to value strings, for use with #if and #ifdef and similar conditionals in shaders. More...
#include <ShaderDefines.h>
Public Member Functions | |
| void | Add (CStrIntern name, CStrIntern value) |
| Add a name and associated value to the map of defines. More... | |
| int | GetInt (const char *name) const |
| Return the value for the given name as an integer, or 0 if not defined. More... | |
Public Member Functions inherited from CShaderParams< CStrIntern > | |
| CShaderParams () | |
| Create an empty map of defines. More... | |
| void | Set (CStrIntern name, const CStrIntern &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, CStrIntern > | 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< CStrIntern > | |
| SItems * | m_Items |
Represents a mapping of name strings to value strings, for use with #if and #ifdef and similar conditionals in shaders.
Not thread-safe - must only be used from the main thread.
Definition at line 133 of file ShaderDefines.h.
| void CShaderDefines::Add | ( | CStrIntern | name, |
| CStrIntern | value | ||
| ) |
Add a name and associated value to the map of defines.
If the name is already defined, its value will be replaced.
Definition at line 194 of file ShaderDefines.cpp.
| int CShaderDefines::GetInt | ( | const char * | name | ) | const |
Return the value for the given name as an integer, or 0 if not defined.
Definition at line 199 of file ShaderDefines.cpp.
1.8.5