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

A class that contains all information necessary to do a single rendering pass. More...

#include <omGraphicsShaderProgram.h>

Public Member Functions

 ShaderProgram ()
 Create a new default shader program that has no implementation sources. More...
 
const TechniqueUsagegetUsage () const
 Return an object that describes the semantic usage of this shader program. More...
 
void setUsage (const TechniqueUsage &newUsage)
 Set an object that describes the semantic usage of this shader program. More...
 
Size getSourceCount () const
 Return the number of sources that this shader program has. More...
 
ShaderProgramSourcegetSource (Index sourceIndex) const
 Return a pointer to the source at the specified index in this shader program. More...
 
ShaderProgramSourcegetSourceWithLanguage (const ShaderLanguage &language) const
 Return a pointer to the source of this shader program that uses the specified shader language. More...
 
Bool setSource (Index sourceIndex, ShaderProgramSource *newSource)
 Replace the source at the specified index in this shader program. More...
 
Bool addSource (ShaderProgramSource *newSource)
 Add a new shader source to the end of this shader program's list of sources. More...
 
void removeSource (Index sourceIndex)
 Remove the source at the specified index in this shader program. More...
 
void clearSources ()
 Clear all sources from this shader program. More...
 

Static Public Attributes

static const ResourceType RESOURCE_TYPE
 The resource type for a shader program. More...
 

Detailed Description

A class that contains all information necessary to do a single rendering pass.

Constructor & Destructor Documentation

om::graphics::materials::ShaderProgram::ShaderProgram ( )
inline

Create a new default shader program that has no implementation sources.

Member Function Documentation

const TechniqueUsage& om::graphics::materials::ShaderProgram::getUsage ( ) const
inline

Return an object that describes the semantic usage of this shader program.

void om::graphics::materials::ShaderProgram::setUsage ( const TechniqueUsage newUsage)
inline

Set an object that describes the semantic usage of this shader program.

Size om::graphics::materials::ShaderProgram::getSourceCount ( ) const
inline

Return the number of sources that this shader program has.

ShaderProgramSource* om::graphics::materials::ShaderProgram::getSource ( Index  sourceIndex) const
inline

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

ShaderProgramSource* om::graphics::materials::ShaderProgram::getSourceWithLanguage ( const ShaderLanguage language) const

Return a pointer to the source of this shader program that uses the specified shader language.

If there is no shader program source that uses the specified shader language, a NULL pointer is returned.

Bool om::graphics::materials::ShaderProgram::setSource ( Index  sourceIndex,
ShaderProgramSource newSource 
)

Replace the source at the specified index in this shader program.

If the specified source is NULL, the method fails and returns FALSE. Otherwise, the source at that index is replaced and TRUE is returned.

Bool om::graphics::materials::ShaderProgram::addSource ( ShaderProgramSource newSource)

Add a new shader source to the end of this shader program's list of sources.

If the specified source is NULL, the method fails and returns FALSE. Otherwise, the new source is added and TRUE is returned.

void om::graphics::materials::ShaderProgram::removeSource ( Index  sourceIndex)

Remove the source at the specified index in this shader program.

This method maintains the order of the remaining sources.

void om::graphics::materials::ShaderProgram::clearSources ( )

Clear all sources from this shader program.

Member Data Documentation

const ResourceType om::graphics::materials::ShaderProgram::RESOURCE_TYPE
static

The resource type for a shader program.


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