Pyrogenesis  trunk
Public Member Functions | List of all members
CShaderDefines Class Reference

Represents a mapping of name strings to value strings, for use with #if and #ifdef and similar conditionals in shaders. More...

#include <ShaderDefines.h>

Inheritance diagram for CShaderDefines:
Inheritance graph
[legend]
Collaboration diagram for CShaderDefines:
Collaboration graph
[legend]

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 &params)
 Add all the names and values from another set of parameters. More...
 
std::map< CStrIntern, CStrInternGetMap () 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
 

Detailed Description

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.

Member Function Documentation

◆ Add()

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.

◆ GetInt()

int CShaderDefines::GetInt ( const char *  name) const

Return the value for the given name as an integer, or 0 if not defined.


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