Om
1.0.0
A universal framework for multimedia simulation
|
A class that represents an OpenGL hardware-executed shading program. More...
#include <omGraphicsOpenGLShaderProgram.h>
Public Member Functions | |
~OpenGLShaderProgram () | |
Destroy this shader program and release all resources associated with it. More... | |
virtual Size | getShaderCount () const |
Return the total number of shaders that are attached to this shader program. More... | |
virtual Shared< DeviceShader > | getShader (Index shaderIndex) const |
Return a pointer to the shader object attached at the specified index to the shader program. More... | |
virtual Bool | addShader (const Shared< DeviceShader > &newShader) |
Attach the specified shader to this shader program. More... | |
virtual Bool | removeShader (Index shaderIndex) |
Detach the shader at the specified index from this shader program. More... | |
virtual Bool | removeShader (const DeviceShader *shader) |
Detach the shader with the specified address from this shader program. More... | |
virtual void | clearShaders () |
Remove all shaders that are attached to this shader program. More... | |
virtual Bool | link (StringOutputStream *linkLog=((void *) 0)) |
Link the program's shaders into a useable shader program. More... | |
virtual Bool | isLinked () const |
Return whether or not a link operation has been attempted on this shader program. More... | |
virtual Bool | isValid () const |
Return whether or not the shader program was linked successfully and is ready for use. More... | |
virtual Size | getConstantVariableCount () const |
Return the total number of constant variables that are part of this shader program. More... | |
virtual const ConstantVariable * | getConstantVariable (Index variableIndex) const |
Return a pointer to the constant variable for this shader program at the given index. More... | |
virtual Bool | getConstantVariable (const ShaderSourceString &variableName, const ConstantVariable *&variable) const |
Get the constant variable that is part of this shader program with the specified name. More... | |
virtual Bool | getConstantVariableIndex (const ShaderSourceString &variableName, Index &variableIndex) const |
Get the constant variable index for this shader program with the specified name. More... | |
virtual Size | getTextureVariableCount () const |
Return the total number of texture variables that are part of this shader program. More... | |
virtual const TextureVariable * | getTextureVariable (Index variableIndex) const |
Return a pointer to the texture variable for this shader program at the given index. More... | |
virtual Bool | getTextureVariable (const ShaderSourceString &variableName, const TextureVariable *&variable) const |
Get the texture variable that is part of this shader program with the specified name. More... | |
virtual Bool | getTextureVariableIndex (const ShaderSourceString &variableName, Index &variableIndex) const |
Get the texture variable index for this shader program with the specified name. More... | |
virtual Size | getVertexVariableCount () const |
Return the total number of vertex variables that are part of this shader program. More... | |
virtual const VertexVariable * | getVertexVariable (Index variableIndex) const |
Return a pointer to the vertex variable for this shader program at the given index. More... | |
virtual Bool | getVertexVariable (const ShaderSourceString &variableName, const VertexVariable *&variable) const |
Get the vertex variable that is part of this shader program with the specified name. More... | |
virtual Bool | getVertexVariableIndex (const ShaderSourceString &variableName, Index &variableIndex) const |
Get the vertex variable index for this shader program with the specified name. More... | |
OpenGLID | getID () const |
Return a unique integer identifier for this shader program within its context. More... | |
Public Member Functions inherited from om::graphics::devices::DeviceResource | |
virtual | ~DeviceResource () |
Destroy a device object, releasing all internal state. More... | |
GraphicsContext * | getContext () const |
Return a pointer to the graphics context associated with this DeviceResource. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from om::graphics::materials::DeviceShaderProgram | |
DeviceShaderProgram (devices::GraphicsContext *newContext) | |
Create a device shader program for the specified context. More... | |
Protected Member Functions inherited from om::graphics::devices::DeviceResource | |
DeviceResource (GraphicsContext *newContext) | |
Create a new device object that is associated with the specified graphics context. More... | |
A class that represents an OpenGL hardware-executed shading program.
om::graphics::devices::opengl::OpenGLShaderProgram::~OpenGLShaderProgram | ( | ) |
Destroy this shader program and release all resources associated with it.
|
virtual |
Return the total number of shaders that are attached to this shader program.
Implements om::graphics::materials::DeviceShaderProgram.
|
virtual |
Return a pointer to the shader object attached at the specified index to the shader program.
Implements om::graphics::materials::DeviceShaderProgram.
|
virtual |
Attach the specified shader to this shader program.
Implements om::graphics::materials::DeviceShaderProgram.
|
virtual |
Detach the shader at the specified index from this shader program.
Implements om::graphics::materials::DeviceShaderProgram.
|
virtual |
Detach the shader with the specified address from this shader program.
Implements om::graphics::materials::DeviceShaderProgram.
|
virtual |
Remove all shaders that are attached to this shader program.
Implements om::graphics::materials::DeviceShaderProgram.
|
virtual |
Link the program's shaders into a useable shader program.
Implements om::graphics::materials::DeviceShaderProgram.
|
virtual |
Return whether or not a link operation has been attempted on this shader program.
Implements om::graphics::materials::DeviceShaderProgram.
|
virtual |
Return whether or not the shader program was linked successfully and is ready for use.
Implements om::graphics::devices::DeviceResource.
|
virtual |
Return the total number of constant variables that are part of this shader program.
Implements om::graphics::materials::DeviceShaderProgram.
|
virtual |
Return a pointer to the constant variable for this shader program at the given index.
Variable indices range from 0 up to the number of constant variables minus one. If an invalid variable index is specified, NULL is returned.
Implements om::graphics::materials::DeviceShaderProgram.
|
virtual |
Get the constant variable that is part of this shader program with the specified name.
The constant variable, if found, is placed in the output reference parameter. The method returns whether or not this shader program has a variable with the given variable name.
Implements om::graphics::materials::DeviceShaderProgram.
|
virtual |
Get the constant variable index for this shader program with the specified name.
The constant variable's index, if found, is placed in the output reference parameter. The method returns whether or not this shader program has a variable with the given variable name.
Implements om::graphics::materials::DeviceShaderProgram.
|
virtual |
Return the total number of texture variables that are part of this shader program.
Implements om::graphics::materials::DeviceShaderProgram.
|
virtual |
Return a pointer to the texture variable for this shader program at the given index.
Variable indices range from 0 up to the number of texture variables minus one. If an invalid variable index is specified, NULL is returned.
Implements om::graphics::materials::DeviceShaderProgram.
|
virtual |
Get the texture variable that is part of this shader program with the specified name.
The texture variable, if found, is placed in the output reference parameter. The method returns whether or not this shader program has a variable with the given variable name.
Implements om::graphics::materials::DeviceShaderProgram.
|
virtual |
Get the texture variable index for this shader program with the specified name.
The texture variable's index, if found, is placed in the output reference parameter. The method returns whether or not this shader program has a variable with the given variable name.
Implements om::graphics::materials::DeviceShaderProgram.
|
virtual |
Return the total number of vertex variables that are part of this shader program.
Implements om::graphics::materials::DeviceShaderProgram.
|
virtual |
Return a pointer to the vertex variable for this shader program at the given index.
Variable indices range from 0 up to the number of vertex variables minus one. If an invalid variable index is specified, NULL is returned.
Implements om::graphics::materials::DeviceShaderProgram.
|
virtual |
Get the vertex variable that is part of this shader program with the specified name.
The vertex variable, if found, is placed in the output reference parameter. The method returns whether or not this shader program has a variable with the given variable name.
Implements om::graphics::materials::DeviceShaderProgram.
|
virtual |
Get the vertex variable index for this shader program with the specified name.
The vertex variable's index, if found, is placed in the output reference parameter. The method returns whether or not this shader program has a variable with the given variable name.
Implements om::graphics::materials::DeviceShaderProgram.
|
inline |
Return a unique integer identifier for this shader program within its context.