Om  1.0.0
A universal framework for multimedia simulation
Public Member Functions | List of all members
om::graphics::materials::ShaderProgramLibrary Class Reference

A library which contains ShaderProgram objects for different TechniqueUsage types. More...

#include <omGraphicsShaderProgramLibrary.h>

Inheritance diagram for om::graphics::materials::ShaderProgramLibrary:
om::graphics::devices::opengl::OpenGLShaderProgramLibrary om::graphics::gui::renderers::DefaultGUIShaderProgramLibrary

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...
 
ShaderProgramgetProgram (Index programsIndex) const
 Return a pointer to the shader program at the specified index in this shader program library. More...
 
ShaderProgramgetProgram (TechniqueUsage::Enum usage) const
 Return a pointer to a shader program in this shader program library with the specified usage. More...
 
ShaderProgramgetProgram (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...
 

Detailed Description

A library which contains ShaderProgram objects for different TechniqueUsage types.

Constructor & Destructor Documentation

om::graphics::materials::ShaderProgramLibrary::ShaderProgramLibrary ( )

Create a new shader program library that contains no shader programs.

virtual om::graphics::materials::ShaderProgramLibrary::~ShaderProgramLibrary ( )
virtual

Destroy this shader program library, releasing all associated resources.

Member Function Documentation

Size om::graphics::materials::ShaderProgramLibrary::getProgramCount ( ) const
inline

Return the number of shader programs that this shader program library has.

ShaderProgram* om::graphics::materials::ShaderProgramLibrary::getProgram ( Index  programsIndex) const
inline

Return a pointer to the shader program at the specified index in this shader program library.

ShaderProgram* om::graphics::materials::ShaderProgramLibrary::getProgram ( TechniqueUsage::Enum  usage) const
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.


The documentation for this class was generated from the following file: