27#ifndef _ShaderProgramManager_
28#define _ShaderProgramManager_
Superclass for all objects that wish to use custom memory allocators when their new / delete operator...
Class defining a single pass of a Technique (of a Material), i.e.
A singleton manager class that manages shader based programs.
void acquirePrograms(Pass *pass, TargetRenderState *renderState)
Acquire CPU/GPU programs set associated with the given render state and bind them to the pass.
GpuProgramsMap mFragmentShaderMap
map< String, ProgramWriter * >::type ProgramWriterMap
map< String, ProgramProcessor * >::type ProgramProcessorMap
void addProgramProcessor(ProgramProcessor *processor)
Add program processor instance to this manager.
String generateGUID(const String &programString)
Generates a unique guid value from a string.
void removeProgramProcessor(ProgramProcessor *processor)
Remove program processor instance from this manager.
ProgramProcessorMap::const_iterator ProgramProcessorConstIterator
ProgramWriterFactoryList mProgramWriterFactories
Program * createCpuProgram(GpuProgramType type)
Create CPU program .
vector< ProgramWriterFactory * >::type ProgramWriterFactoryList
void bindUniformParameters(Program *pCpuProgram, const GpuProgramParametersSharedPtr &passParams)
Bind the uniform parameters of a given CPU and GPU program set.
ProgramProcessorMap::iterator ProgramProcessorIterator
~ProgramManager()
Class destructor.
void synchronizePixelnToBeVertexOut(ProgramSet *programSet)
Fix the input of the pixel shader to be the same as the output of the vertex shader.
void flushGpuProgramsCache()
Flush the local GPU programs cache.
void destroyDefaultProgramWriterFactories()
Destroy default program processors.
void destroyDefaultProgramProcessors()
Destroy default program processors.
void createDefaultProgramProcessors()
Create default program processors.
ProgramList mCpuProgramsList
ProgramManager()
Class default constructor.
ProgramWriterMap::iterator ProgramWriterIterator
size_t getFragmentShaderCount() const
Return the number of created fragment shaders.
GpuProgramPtr createGpuProgram(Program *shaderProgram, ProgramWriter *programWriter, const String &language, const String &profiles, const StringVector &profilesList, const String &cachePath)
Create GPU program based on the give CPU program.
ProgramList::iterator ProgramListIterator
void releasePrograms(Pass *pass, TargetRenderState *renderState)
Release CPU/GPU programs set associated with the given render state and pass.
vector< ProgramProcessor * >::type ProgramProcessorList
GpuProgramsMap mVertexShaderMap
void createDefaultProgramWriterFactories()
Create default program processors.
void destroyProgramWriters()
Destroy all program writers.
static ProgramManager & getSingleton()
Override standard Singleton retrieval.
bool createGpuPrograms(ProgramSet *programSet)
Create GPU programs for the given program set based on the CPU programs it contains.
static ProgramManager * getSingletonPtr()
Override standard Singleton retrieval.
set< Program * >::type ProgramList
size_t getVertexShaderCount() const
Return the number of created vertex shaders.
void flushGpuProgramsCache(GpuProgramsMap &gpuProgramsMap)
Flush the local GPU programs cache.
void destroyGpuProgram(GpuProgramPtr &gpuProgram)
Destroy a GPU program by name.
GpuProgramsMap::const_iterator GpuProgramsMapConstIterator
void destroyCpuProgram(Program *shaderProgram)
Destroy a CPU program by name.
GpuProgramsMap::iterator GpuProgramsMapIterator
ProgramWriterMap mProgramWritersMap
map< String, GpuProgramPtr >::type GpuProgramsMap
ProgramProcessorMap mProgramProcessorsMap
ProgramProcessorList mDefaultProgramProcessors
A class that provides extra processing services on CPU based programs.
Container class for shader based programs.
Base class interface for shader program writers.
A class that represents a shader based program.
Shader generator system main interface.
This is the target render state.
Template class for creating single-instance global classes.
vector< String >::type StringVector
GpuProgramType
Enumerates the types of programs which can run on the GPU.
std::map< K, V, P, A > type