18 #ifndef INCLUDED_SHADERMANAGER
19 #define INCLUDED_SHADERMANAGER
21 #define USE_SHADER_XML_VALIDATION 1
23 #include <boost/unordered_map.hpp>
24 #include <boost/weak_ptr.hpp>
30 #if USE_SHADER_XML_VALIDATION
84 if (name < k.
name)
return true;
85 if (k.
name < name)
return false;
117 typedef boost::unordered_map<EffectCacheKey, CShaderTechniquePtr, EffectCacheKeyHash>
EffectCacheMap;
121 typedef boost::unordered_map<VfsPath, std::set<boost::weak_ptr<CShaderProgram> > >
HotloadFilesMap;
124 #if USE_SHADER_XML_VALIDATION
135 #endif // INCLUDED_SHADERMANAGER
HotloadFilesMap m_HotloadFiles
bool operator<(const CacheKey &k) const
Key for effect cache lookups.
shared_ptr< CShaderTechnique > CShaderTechniquePtr
std::map< CacheKey, CShaderProgramPtr > m_ProgramCache
bool NewEffect(const char *name, const CShaderDefines &defines, CShaderTechniquePtr &tech)
Status ReloadChangedFile(const VfsPath &path)
CShaderTechniquePtr LoadEffect(CStrIntern name, const CShaderDefines &defines1, const CShaderDefines &defines2)
Load a shader effect.
boost::unordered_map< EffectCacheKey, CShaderTechniquePtr, EffectCacheKeyHash > EffectCacheMap
EffectCacheMap m_EffectCache
i64 Status
Error handling system.
bool operator==(const EffectCacheKey &b) const
RelaxNGValidator m_Validator
static Status ReloadChangedFileCB(void *param, const VfsPath &path)
Represents a mapping of name strings to value strings, for use with #if and #ifdef and similar condit...
CShaderProgramPtr LoadProgram(const char *name, const CShaderDefines &defines)
Load a shader program.
size_t GetNumEffectsLoaded()
Returns the number of shader effects that are currently loaded.
size_t operator()(const EffectCacheKey &key) const
bool NewProgram(const char *name, const CShaderDefines &defines, CShaderProgramPtr &program)
shared_ptr< CShaderProgram > CShaderProgramPtr
boost::unordered_map< VfsPath, std::set< boost::weak_ptr< CShaderProgram > > > HotloadFilesMap
Shader manager: loads and caches shader programs.