Castor3D
..
|
Manager used to hold the shader programs. Holds it, destroys it during a rendering loop. More...
Public Member Functions | |
C3D_API | ShaderManager (Engine &p_engine) |
Constructor. More... | |
C3D_API | ~ShaderManager () |
Destructor. More... | |
C3D_API void | Clear () |
Destroys all the shaders of the array of shaders to destroy. More... | |
C3D_API void | Cleanup () |
Cleans up all the shaders. More... | |
C3D_API ShaderProgramSPtr | GetNewProgram (eSHADER_LANGUAGE p_langage=eSHADER_LANGUAGE_AUTO) |
Creates a new program. More... | |
C3D_API ShaderProgramSPtr | GetAutomaticProgram (RenderTechnique const &p_technique, uint32_t p_textureFlags, uint32_t p_programFlags) |
Looks for an automatically generated program corresponding to given flags. More... | |
C3D_API ShaderProgramSPtr | GetBillboardProgram (uint32_t p_textureFlags, uint32_t p_programFlags) const |
Looks for a billboards shader program corresponding to given flags. More... | |
C3D_API void | AddBillboardProgram (ShaderProgramSPtr p_program, uint32_t p_textureFlags, uint32_t p_programFlags) |
Adds a billboards shader program corresponding to given flags. More... | |
C3D_API FrameVariableBufferSPtr | CreateMatrixBuffer (ShaderProgram &p_program, uint32_t p_shaderMask) |
Creates a matrix frame variable buffer. More... | |
C3D_API FrameVariableBufferSPtr | CreateSceneBuffer (ShaderProgram &p_program, uint32_t p_shaderMask) |
Creates a scene frame variable buffer. More... | |
C3D_API FrameVariableBufferSPtr | CreatePassBuffer (ShaderProgram &p_program, uint32_t p_shaderMask) |
Creates a pass frame variable buffer. More... | |
C3D_API void | CreateTextureVariables (ShaderProgram &p_program, uint32_t p_uiTextureFlags) |
Creates the textures related frame variables. More... | |
void | lock () const |
Locks the collection mutex. More... | |
void | unlock () const |
Unlocks the collection mutex. More... | |
void | SetRenderSystem (RenderSystem *const &p_renderSystem) |
Sets the RenderSystem. More... | |
ShaderProgramPtrArray::iterator | begin () |
Retrieves an iterator to the beginning of the shaders list. More... | |
ShaderProgramPtrArray::const_iterator | begin () const |
Retrieves an iterator to the beginning of the shaders list. More... | |
ShaderProgramPtrArray::iterator | end () |
Retrieves an iterator to the end of the shaders list. More... | |
ShaderProgramPtrArray::const_iterator | end () const |
Retrieves an iterator to the end of the shaders list. More... | |
Manager used to hold the shader programs. Holds it, destroys it during a rendering loop.
C3D_API Castor3D::ShaderManager::ShaderManager | ( | Engine & | p_engine | ) |
Constructor.
[in] | p_engine | The engine |
C3D_API Castor3D::ShaderManager::~ShaderManager | ( | ) |
Destructor.
C3D_API void Castor3D::ShaderManager::AddBillboardProgram | ( | ShaderProgramSPtr | p_program, |
uint32_t | p_textureFlags, | ||
uint32_t | p_programFlags | ||
) |
Adds a billboards shader program corresponding to given flags.
[in] | p_program | The program to add. |
[in] | p_textureFlags | Bitwise ORed eTEXTURE_CHANNEL. |
[in] | p_programFlags | Bitwise ORed ePROGRAM_FLAG. |
|
inline |
Retrieves an iterator to the beginning of the shaders list.
|
inline |
Retrieves an iterator to the beginning of the shaders list.
C3D_API void Castor3D::ShaderManager::Cleanup | ( | ) |
Cleans up all the shaders.
C3D_API void Castor3D::ShaderManager::Clear | ( | ) |
Destroys all the shaders of the array of shaders to destroy.
C3D_API FrameVariableBufferSPtr Castor3D::ShaderManager::CreateMatrixBuffer | ( | ShaderProgram & | p_program, |
uint32_t | p_shaderMask | ||
) |
Creates a matrix frame variable buffer.
[in] | p_program | The programme to which the buffer is bound |
[in] | p_shaderMask | MASK_SHADER_TYPE combination, to set at what shaders it is to be bound |
C3D_API FrameVariableBufferSPtr Castor3D::ShaderManager::CreatePassBuffer | ( | ShaderProgram & | p_program, |
uint32_t | p_shaderMask | ||
) |
Creates a pass frame variable buffer.
[in] | p_program | The program to which the buffer is bound |
[in] | p_shaderMask | MASK_SHADER_TYPE combination, to set at what shaders it is to be bound |
C3D_API FrameVariableBufferSPtr Castor3D::ShaderManager::CreateSceneBuffer | ( | ShaderProgram & | p_program, |
uint32_t | p_shaderMask | ||
) |
Creates a scene frame variable buffer.
[in] | p_program | The program to which the buffer is bound |
[in] | p_shaderMask | MASK_SHADER_TYPE combination, to set at what shaders it is to be bound |
C3D_API void Castor3D::ShaderManager::CreateTextureVariables | ( | ShaderProgram & | p_program, |
uint32_t | p_uiTextureFlags | ||
) |
Creates the textures related frame variables.
[in] | p_uiTextureFlags | Bitwise ORed eTEXTURE_CHANNEL |
[in] | p_program | The program to which the buffer is bound |
|
inline |
Retrieves an iterator to the end of the shaders list.
|
inline |
Retrieves an iterator to the end of the shaders list.
C3D_API ShaderProgramSPtr Castor3D::ShaderManager::GetAutomaticProgram | ( | RenderTechnique const & | p_technique, |
uint32_t | p_textureFlags, | ||
uint32_t | p_programFlags | ||
) |
Looks for an automatically generated program corresponding to given flags.
[in] | p_technique | The technique from witch the program code is retrieved |
[in] | p_textureFlags | Bitwise ORed eTEXTURE_CHANNEL |
[in] | p_programFlags | Bitwise ORed ePROGRAM_FLAG |
C3D_API ShaderProgramSPtr Castor3D::ShaderManager::GetBillboardProgram | ( | uint32_t | p_textureFlags, |
uint32_t | p_programFlags | ||
) | const |
Looks for a billboards shader program corresponding to given flags.
[in] | p_textureFlags | Bitwise ORed eTEXTURE_CHANNEL. |
[in] | p_programFlags | Bitwise ORed ePROGRAM_FLAG. |
C3D_API ShaderProgramSPtr Castor3D::ShaderManager::GetNewProgram | ( | eSHADER_LANGUAGE | p_langage = eSHADER_LANGUAGE_AUTO | ) |
Creates a new program.
[in] | p_langage | The wanted shader language |
|
inline |
Locks the collection mutex.
|
inline |
Sets the RenderSystem.
[in] | p_renderSystem | The new value |
|
inline |
Unlocks the collection mutex.