1 #ifndef OPENMW_COMPONENTS_SHADERMANAGER_H
2 #define OPENMW_COMPONENTS_SHADERMANAGER_H
11 #include <OpenThreads/Mutex>
23 typedef std::map<std::string, std::string>
DefineMap;
33 osg::ref_ptr<osg::Program>
getProgram(osg::ref_ptr<osg::Shader> vertexShader, osg::ref_ptr<osg::Shader> fragmentShader);
44 typedef std::pair<std::string, DefineMap>
MapKey;
45 typedef std::map<MapKey, osg::ref_ptr<osg::Shader> >
ShaderMap;
48 typedef std::map<std::pair<osg::ref_ptr<osg::Shader>, osg::ref_ptr<osg::Shader> >, osg::ref_ptr<osg::Program> >
ProgramMap;
OpenThreads::Mutex mMutex
Definition: shadermanager.hpp:51
std::map< std::string, std::string > DefineMap
Definition: shadermanager.hpp:23
std::string mPath
Definition: shadermanager.hpp:38
osg::ref_ptr< osg::Shader > getShader(const std::string &shaderTemplate, const DefineMap &defines, osg::Shader::Type shaderType)
Definition: shadermanager.cpp:104
std::map< std::string, std::string > TemplateMap
Definition: shadermanager.hpp:41
std::map< MapKey, osg::ref_ptr< osg::Shader > > ShaderMap
Definition: shadermanager.hpp:45
std::pair< std::string, DefineMap > MapKey
Definition: shadermanager.hpp:44
ShaderMap mShaders
Definition: shadermanager.hpp:46
Reads shader template files and turns them into a concrete shader, based on a list of define's...
Definition: shadermanager.hpp:18
std::map< std::pair< osg::ref_ptr< osg::Shader >, osg::ref_ptr< osg::Shader > >, osg::ref_ptr< osg::Program > > ProgramMap
Definition: shadermanager.hpp:48
osg::ref_ptr< osg::Program > getProgram(osg::ref_ptr< osg::Shader > vertexShader, osg::ref_ptr< osg::Shader > fragmentShader)
Definition: shadermanager.cpp:153
State
Definition: state.hpp:6
ProgramMap mPrograms
Definition: shadermanager.hpp:49
void setShaderPath(const std::string &path)
Definition: shadermanager.cpp:19
TemplateMap mShaderTemplates
Definition: shadermanager.hpp:42
void releaseGLObjects(osg::State *state)
Definition: shadermanager.cpp:167
Type
Definition: soundmanager.hpp:39