A singleton manager class that manages shader based programs. More...
#include <OgreShaderProgramManager.h>
Public Member Functions | |
ProgramManager () | |
Class default constructor. More... | |
~ProgramManager () | |
Class destructor. More... | |
void | acquirePrograms (Pass *pass, TargetRenderState *renderState) |
Acquire CPU/GPU programs set associated with the given render state and bind them to the pass. More... | |
void | flushGpuProgramsCache () |
Flush the local GPU programs cache. More... | |
void | operator delete (void *ptr) |
void | operator delete (void *ptr, void *) |
void | operator delete (void *ptr, const char *, int, const char *) |
void | operator delete[] (void *ptr) |
void | operator delete[] (void *ptr, const char *, int, const char *) |
void * | operator new (size_t sz, const char *file, int line, const char *func) |
operator new, with debug line info More... | |
void * | operator new (size_t sz) |
void * | operator new (size_t sz, void *ptr) |
placement operator new More... | |
void * | operator new[] (size_t sz, const char *file, int line, const char *func) |
array operator new, with debug line info More... | |
void * | operator new[] (size_t sz) |
void | releasePrograms (Pass *pass, TargetRenderState *renderState) |
Release CPU/GPU programs set associated with the given render state and pass. More... | |
Static Public Member Functions | |
static ProgramManager & | getSingleton () |
Override standard Singleton retrieval. More... | |
static ProgramManager * | getSingletonPtr () |
Override standard Singleton retrieval. More... | |
Protected Types | |
typedef map< String, GpuProgramPtr >::type | GpuProgramsMap |
typedef GpuProgramsMap::const_iterator | GpuProgramsMapConstIterator |
typedef GpuProgramsMap::iterator | GpuProgramsMapIterator |
typedef set< Program * >::type | ProgramList |
typedef ProgramList::iterator | ProgramListIterator |
typedef ProgramProcessorMap::const_iterator | ProgramProcessorConstIterator |
typedef ProgramProcessorMap::iterator | ProgramProcessorIterator |
typedef vector < ProgramProcessor * >::type | ProgramProcessorList |
typedef map< String, ProgramProcessor * >::type | ProgramProcessorMap |
typedef vector < ProgramWriterFactory * > ::type | ProgramWriterFactoryList |
typedef ProgramWriterMap::iterator | ProgramWriterIterator |
typedef map< String, ProgramWriter * >::type | ProgramWriterMap |
Protected Member Functions | |
void | addProgramProcessor (ProgramProcessor *processor) |
Add program processor instance to this manager. More... | |
void | bindUniformParameters (Program *pCpuProgram, const GpuProgramParametersSharedPtr &passParams) |
Bind the uniform parameters of a given CPU and GPU program set. More... | |
Program * | createCpuProgram (GpuProgramType type) |
Create CPU program . More... | |
void | createDefaultProgramProcessors () |
Create default program processors. More... | |
void | createDefaultProgramWriterFactories () |
Create default program processors. More... | |
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. More... | |
bool | createGpuPrograms (ProgramSet *programSet) |
Create GPU programs for the given program set based on the CPU programs it contains. More... | |
void | destroyCpuProgram (Program *shaderProgram) |
Destroy a CPU program by name. More... | |
void | destroyDefaultProgramProcessors () |
Destroy default program processors. More... | |
void | destroyDefaultProgramWriterFactories () |
Destroy default program processors. More... | |
void | destroyGpuProgram (GpuProgramPtr &gpuProgram) |
Destroy a GPU program by name. More... | |
void | destroyProgramWriters () |
Destroy all program writers. More... | |
void | flushGpuProgramsCache (GpuProgramsMap &gpuProgramsMap) |
Flush the local GPU programs cache. More... | |
String | generateGUID (const String &programString) |
Generates a unique guid value from a string. More... | |
size_t | getFragmentShaderCount () const |
Return the number of created fragment shaders. More... | |
size_t | getVertexShaderCount () const |
Return the number of created vertex shaders. More... | |
void | removeProgramProcessor (ProgramProcessor *processor) |
Remove program processor instance from this manager. More... | |
void | synchronizePixelnToBeVertexOut (ProgramSet *programSet) |
Fix the input of the pixel shader to be the same as the output of the vertex shader. More... | |
Static Protected Attributes | |
static ProgramManager * | msSingleton |
Friends | |
class | ProgramSet |
class | ShaderGenerator |
class | TargetRenderState |
A singleton manager class that manages shader based programs.
Definition at line 46 of file OgreShaderProgramManager.h.
|
protected |
Definition at line 111 of file OgreShaderProgramManager.h.
|
protected |
Definition at line 113 of file OgreShaderProgramManager.h.
|
protected |
Definition at line 112 of file OgreShaderProgramManager.h.
|
protected |
Definition at line 116 of file OgreShaderProgramManager.h.
|
protected |
Definition at line 117 of file OgreShaderProgramManager.h.
|
protected |
Definition at line 125 of file OgreShaderProgramManager.h.
|
protected |
Definition at line 124 of file OgreShaderProgramManager.h.
|
protected |
Definition at line 126 of file OgreShaderProgramManager.h.
|
protected |
Definition at line 123 of file OgreShaderProgramManager.h.
|
protected |
Definition at line 120 of file OgreShaderProgramManager.h.
|
protected |
Definition at line 119 of file OgreShaderProgramManager.h.
|
protected |
Definition at line 118 of file OgreShaderProgramManager.h.
Ogre::RTShader::ProgramManager::ProgramManager | ( | ) |
Class default constructor.
Ogre::RTShader::ProgramManager::~ProgramManager | ( | ) |
Class destructor.
void Ogre::RTShader::ProgramManager::acquirePrograms | ( | Pass * | pass, |
TargetRenderState * | renderState | ||
) |
Acquire CPU/GPU programs set associated with the given render state and bind them to the pass.
pass | The pass to bind the programs to. |
renderState | The render state that describes the program that need to be generated. |
|
protected |
Add program processor instance to this manager.
processor | The instance to add. |
|
protected |
Bind the uniform parameters of a given CPU and GPU program set.
|
protected |
Create CPU program .
type | The type of the program to create. |
|
protected |
Create default program processors.
|
protected |
Create default program processors.
|
protected |
Create GPU program based on the give CPU program.
shaderProgram | The CPU program instance. |
programWriter | The program writer instance. |
language | The target shader language. |
profiles | The profiles string for program compilation. |
profilesList | The profiles string for program compilation as string list. |
cachePath | The output path to write the program into. |
|
protected |
Create GPU programs for the given program set based on the CPU programs it contains.
programSet | The program set container. |
|
protected |
Destroy a CPU program by name.
shaderProgram | The CPU program instance to destroy. |
|
protected |
Destroy default program processors.
|
protected |
Destroy default program processors.
|
protected |
Destroy a GPU program by name.
gpuProgram | The program to destroy. |
|
protected |
Destroy all program writers.
void Ogre::RTShader::ProgramManager::flushGpuProgramsCache | ( | ) |
Flush the local GPU programs cache.
|
protected |
Flush the local GPU programs cache.
gpuProgramsMap | The GPU programs cache. |
Generates a unique guid value from a string.
programString | string to generate a hash value for |
|
inlineprotected |
Return the number of created fragment shaders.
Definition at line 208 of file OgreShaderProgramManager.h.
|
static |
Override standard Singleton retrieval.
|
static |
Override standard Singleton retrieval.
|
inlineprotected |
Return the number of created vertex shaders.
Definition at line 205 of file OgreShaderProgramManager.h.
|
inlineinherited |
Definition at line 96 of file OgreMemoryAllocatedObject.h.
|
inlineinherited |
Definition at line 102 of file OgreMemoryAllocatedObject.h.
|
inlineinherited |
Definition at line 108 of file OgreMemoryAllocatedObject.h.
|
inlineinherited |
Definition at line 113 of file OgreMemoryAllocatedObject.h.
|
inlineinherited |
Definition at line 119 of file OgreMemoryAllocatedObject.h.
|
inlineinherited |
operator new, with debug line info
Definition at line 68 of file OgreMemoryAllocatedObject.h.
|
inlineinherited |
Definition at line 73 of file OgreMemoryAllocatedObject.h.
|
inlineinherited |
placement operator new
Definition at line 79 of file OgreMemoryAllocatedObject.h.
|
inlineinherited |
array operator new, with debug line info
Definition at line 86 of file OgreMemoryAllocatedObject.h.
|
inlineinherited |
Definition at line 91 of file OgreMemoryAllocatedObject.h.
void Ogre::RTShader::ProgramManager::releasePrograms | ( | Pass * | pass, |
TargetRenderState * | renderState | ||
) |
Release CPU/GPU programs set associated with the given render state and pass.
pass | The pass to release the programs from. |
renderState | The render state holds the programs. |
|
protected |
Remove program processor instance from this manager.
processor | The instance to remove. |
|
protected |
Fix the input of the pixel shader to be the same as the output of the vertex shader.
|
friend |
Definition at line 237 of file OgreShaderProgramManager.h.
|
friend |
Definition at line 239 of file OgreShaderProgramManager.h.
|
friend |
Definition at line 238 of file OgreShaderProgramManager.h.
|
protected |
Definition at line 222 of file OgreShaderProgramManager.h.
|
protected |
Definition at line 234 of file OgreShaderProgramManager.h.
|
protected |
Definition at line 232 of file OgreShaderProgramManager.h.
|
protected |
Definition at line 226 of file OgreShaderProgramManager.h.
|
protected |
Definition at line 228 of file OgreShaderProgramManager.h.
|
protected |
Definition at line 224 of file OgreShaderProgramManager.h.
|
staticprotectedinherited |
Definition at line 75 of file OgreSingleton.h.
|
protected |
Definition at line 230 of file OgreShaderProgramManager.h.