Om
1.0.0
A universal framework for multimedia simulation
|
A library which contains ShaderProgram objects for different TechniqueUsage types. More...
#include <omGraphicsShaderProgramLibrary.h>
Public Member Functions | |
ShaderProgramLibrary () | |
Create a new shader program library that contains no shader programs. More... | |
virtual | ~ShaderProgramLibrary () |
Destroy this shader program library, releasing all associated resources. More... | |
Size | getProgramCount () const |
Return the number of shader programs that this shader program library has. More... | |
ShaderProgram * | getProgram (Index programsIndex) const |
Return a pointer to the shader program at the specified index in this shader program library. More... | |
ShaderProgram * | getProgram (TechniqueUsage::Enum usage) const |
Return a pointer to a shader program in this shader program library with the specified usage. More... | |
ShaderProgram * | getProgram (const TechniqueUsage &usage) const |
Return a pointer to a shader program in this shader program library with the specified usage. More... | |
Bool | addProgram (ShaderProgram *newProgram) |
Add a new shader program to the end of this shader program library's list of passes. More... | |
void | removeProgram (Index programsIndex) |
Remove the shader program at the specified index in this shader program library. More... | |
void | clearPrograms () |
Clear all shader programs from this shader program library. More... | |
A library which contains ShaderProgram objects for different TechniqueUsage types.
om::graphics::materials::ShaderProgramLibrary::ShaderProgramLibrary | ( | ) |
Create a new shader program library that contains no shader programs.
|
virtual |
Destroy this shader program library, releasing all associated resources.
|
inline |
Return the number of shader programs that this shader program library has.
|
inline |
Return a pointer to the shader program at the specified index in this shader program library.
|
inline |
Return a pointer to a shader program in this shader program library with the specified usage.
If there is no shader program with that usage, a NULL pointer is returned.
ShaderProgram* om::graphics::materials::ShaderProgramLibrary::getProgram | ( | const TechniqueUsage & | usage | ) | const |
Return a pointer to a shader program in this shader program library with the specified usage.
If there is no shader program with that usage, a NULL pointer is returned.
Bool om::graphics::materials::ShaderProgramLibrary::addProgram | ( | ShaderProgram * | newProgram | ) |
Add a new shader program to the end of this shader program library's list of passes.
If the specified shader program is NULL, the method fails and returns FALSE. Otherwise, the new pass is added and TRUE is returned.
void om::graphics::materials::ShaderProgramLibrary::removeProgram | ( | Index | programsIndex | ) |
Remove the shader program at the specified index in this shader program library.
This method maintains the order of the remaining shader programs.
void om::graphics::materials::ShaderProgramLibrary::clearPrograms | ( | ) |
Clear all shader programs from this shader program library.