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.
map< String, ProgramProcessor * >::type ProgramProcessorMap
ProgramProcessorMap::iterator ProgramProcessorIterator
set< Program * >::type ProgramList
GpuProgramsMap mFragmentShaderMap
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.
ProgramWriterFactoryList mProgramWriterFactories
Program * createCpuProgram(GpuProgramType type)
Create CPU program .
void bindUniformParameters(Program *pCpuProgram, const GpuProgramParametersSharedPtr &passParams)
Bind the uniform parameters of a given CPU and GPU program set.
map< String, ProgramWriter * >::type ProgramWriterMap
GpuProgramsMap::const_iterator GpuProgramsMapConstIterator
~ProgramManager()
Class destructor.
ProgramWriterMap::iterator ProgramWriterIterator
void synchronizePixelnToBeVertexOut(ProgramSet *programSet)
Fix the input of the pixel shader to be the same as the output of the vertex shader.
GpuProgramsMap::iterator GpuProgramsMapIterator
void flushGpuProgramsCache()
Flush the local GPU programs cache.
void destroyDefaultProgramWriterFactories()
Destroy default program processors.
void destroyDefaultProgramProcessors()
Destroy default program processors.
map< String, GpuProgramPtr >::type GpuProgramsMap
void createDefaultProgramProcessors()
Create default program processors.
ProgramList mCpuProgramsList
ProgramManager()
Class default constructor.
ProgramProcessorMap::const_iterator ProgramProcessorConstIterator
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.
void releasePrograms(Pass *pass, TargetRenderState *renderState)
Release CPU/GPU programs set associated with the given render state and pass.
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.
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.
ProgramList::iterator ProgramListIterator
void destroyCpuProgram(Program *shaderProgram)
Destroy a CPU program by name.
vector< ProgramProcessor * >::type ProgramProcessorList
vector< ProgramWriterFactory * >::type ProgramWriterFactoryList
ProgramWriterMap mProgramWritersMap
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.