18 #ifndef INCLUDED_SHADERDEFINES
19 #define INCLUDED_SHADERDEFINES
25 #include <boost/unordered_map.hpp>
38 template<
typename value_t>
62 std::map<CStrIntern, value_t>
GetMap()
const;
98 typedef std::pair<CStrIntern, value_t>
Item;
145 int GetInt(
const char* name)
const;
192 void Add(
const char* name);
216 void Add(
const char* defname,
const char* defvalue,
int type, std::vector<float> &args);
224 #endif // INCLUDED_SHADERDEFINES
std::pair< CStrIntern, value_t > Item
void Add(CStrIntern name, CStrIntern value)
Add a name and associated value to the map of defines.
bool operator<(const CShaderParams &b) const
Compare with some arbitrary total order.
Uniform values that need to be evaluated in the renderer.
std::map< CStrIntern, value_t > GetMap() const
Return a copy of the current name/value mapping.
static CShaderParams s_Empty
RenderQuery GetItem(size_t i) const
std::vector< float > m_CondArgs
boost::unordered_map< SItems, shared_ptr< SItems > > InternedItems_t
bool operator!=(const CShaderParams &b) const
Fast inequality comparison.
CShaderParams()
Create an empty map of defines.
std::vector< CondDefine > m_Defines
static CShaderParams CreateEmpty()
void Add(const char *name)
size_t GetHash() const
Return a hash of the current mapping.
Represents a mapping of name strings to value strings, for use with #if and #ifdef and similar condit...
Represents a mapping of name strings to value, for use with CShaderDefines (values are strings) and C...
void SetMany(const CShaderParams ¶ms)
Add all the names and values from another set of parameters.
bool operator==(const CShaderParams &b) const
Fast equality comparison.
int GetInt(const char *name) const
Return the value for the given name as an integer, or 0 if not defined.
static SItems * GetInterned(const SItems &items)
Returns a pointer to an SItems equal to items.
const CondDefine & GetItem(size_t i) const
std::vector< Item > items
void Set(CStrIntern name, const value_t &value)
Add a name and associated value to the map of parameters.
static InternedItems_t s_InternedItems
std::vector< RenderQuery > m_Items
shared_ptr< CShaderProgram > CShaderProgramPtr
void Add(const char *defname, const char *defvalue, int type, std::vector< float > &args)
std::pair< int, CStrIntern > RenderQuery