C++ encapsulation of GLSL Program Object. More...
#include <OgreGLSLLinkProgram.h>
Classes | |
struct | CustomAttribute |
Name / attribute list. More... | |
Public Member Functions | |
GLSLLinkProgram (GLSLGpuProgram *vertexProgram, GLSLGpuProgram *geometryProgram, GLSLGpuProgram *fragmentProgram) | |
Constructor should only be used by GLSLLinkProgramManager. More... | |
~GLSLLinkProgram (void) | |
void | activate (void) |
Makes a program object active by making sure it is linked and then putting it in use. More... | |
GLuint | getAttributeIndex (VertexElementSemantic semantic, uint index) |
Get the index of a non-standard attribute bound in the linked code. More... | |
GLhandleARB | getGLHandle (void) const |
Get the GL Handle for the program object. More... | |
bool | isAttributeValid (VertexElementSemantic semantic, uint index) |
Is a non-standard attribute bound in the linked code? More... | |
bool | isSkeletalAnimationIncluded (void) const |
Returns whether the linked program includes the required instructions to perform skeletal animation. More... | |
void | setSkeletalAnimationIncluded (bool included) |
Sets whether the linked program includes the required instructions to perform skeletal animation. More... | |
void | updatePassIterationUniforms (GpuProgramParametersSharedPtr params) |
Updates program object uniforms using data from pass iteration GpuProgramParameters. More... | |
void | updateUniforms (GpuProgramParametersSharedPtr params, uint16 mask, GpuProgramType fromProgType) |
Updates program object uniforms using data from GpuProgramParameters. More... | |
Private Types | |
typedef set< GLuint >::type | AttributeSet |
Private Member Functions | |
void | buildGLUniformReferences (void) |
Build uniform references from active named uniforms. More... | |
void | compileAndLink () |
Compiles and links the the vertex and fragment programs. More... | |
void | extractAttributes (void) |
Extract attributes. More... | |
String | getCombinedName () |
void | getMicrocodeFromCache () |
Get the the binary data of a program from the microcode cache. More... | |
Private Attributes | |
GLSLGpuProgram * | mFragmentProgram |
Linked fragment program. More... | |
GLSLGpuProgram * | mGeometryProgram |
Linked geometry program. More... | |
GLhandleARB | mGLHandle |
GL handle for the program object. More... | |
GLUniformReferenceList | mGLUniformReferences |
Container of uniform references that are active in the program object. More... | |
GLint | mLinked |
Flag indicating that the program object has been successfully linked. More... | |
bool | mSkeletalAnimation |
Flag indicating skeletal animation is being performed. More... | |
bool | mTriedToLinkAndFailed |
Flag indicating that the program object has tried to link and failed. More... | |
GLUniformCache * | mUniformCache |
bool | mUniformRefsBuilt |
Flag to indicate that uniform references have already been built. More... | |
AttributeSet | mValidAttributes |
Custom attribute bindings. More... | |
GLSLGpuProgram * | mVertexProgram |
Linked vertex program. More... | |
Static Private Attributes | |
static CustomAttribute | msCustomAttributes [] |
C++ encapsulation of GLSL Program Object.
Definition at line 57 of file src/GLSL/include/OgreGLSLLinkProgram.h.
|
private |
Definition at line 87 of file src/GLSL/include/OgreGLSLLinkProgram.h.
Ogre::GLSL::GLSLLinkProgram::GLSLLinkProgram | ( | GLSLGpuProgram * | vertexProgram, |
GLSLGpuProgram * | geometryProgram, | ||
GLSLGpuProgram * | fragmentProgram | ||
) |
Constructor should only be used by GLSLLinkProgramManager.
Ogre::GLSL::GLSLLinkProgram::~GLSLLinkProgram | ( | void | ) |
void Ogre::GLSL::GLSLLinkProgram::activate | ( | void | ) |
Makes a program object active by making sure it is linked and then putting it in use.
|
private |
Build uniform references from active named uniforms.
|
private |
Compiles and links the the vertex and fragment programs.
|
private |
Extract attributes.
GLuint Ogre::GLSL::GLSLLinkProgram::getAttributeIndex | ( | VertexElementSemantic | semantic, |
uint | index | ||
) |
Get the index of a non-standard attribute bound in the linked code.
|
private |
|
inline |
Get the GL Handle for the program object.
Definition at line 126 of file src/GLSL/include/OgreGLSLLinkProgram.h.
|
private |
Get the the binary data of a program from the microcode cache.
bool Ogre::GLSL::GLSLLinkProgram::isAttributeValid | ( | VertexElementSemantic | semantic, |
uint | index | ||
) |
Is a non-standard attribute bound in the linked code?
|
inline |
Returns whether the linked program includes the required instructions to perform skeletal animation.
Definition at line 142 of file src/GLSL/include/OgreGLSLLinkProgram.h.
|
inline |
Sets whether the linked program includes the required instructions to perform skeletal animation.
Definition at line 133 of file src/GLSL/include/OgreGLSLLinkProgram.h.
void Ogre::GLSL::GLSLLinkProgram::updatePassIterationUniforms | ( | GpuProgramParametersSharedPtr | params | ) |
Updates program object uniforms using data from pass iteration GpuProgramParameters.
normally called by GLSLGpuProgram::bindMultiPassParameters() just before multi pass rendering occurs.
void Ogre::GLSL::GLSLLinkProgram::updateUniforms | ( | GpuProgramParametersSharedPtr | params, |
uint16 | mask, | ||
GpuProgramType | fromProgType | ||
) |
Updates program object uniforms using data from GpuProgramParameters.
normally called by GLSLGpuProgram::bindParameters() just before rendering occurs.
|
private |
Linked fragment program.
Definition at line 68 of file src/GLSL/include/OgreGLSLLinkProgram.h.
|
private |
Linked geometry program.
Definition at line 66 of file src/GLSL/include/OgreGLSLLinkProgram.h.
|
private |
GL handle for the program object.
Definition at line 74 of file src/GLSL/include/OgreGLSLLinkProgram.h.
|
private |
Container of uniform references that are active in the program object.
Definition at line 61 of file src/GLSL/include/OgreGLSLLinkProgram.h.
|
private |
Flag indicating that the program object has been successfully linked.
Definition at line 76 of file src/GLSL/include/OgreGLSLLinkProgram.h.
|
staticprivate |
Definition at line 100 of file src/GLSL/include/OgreGLSLLinkProgram.h.
|
private |
Flag indicating skeletal animation is being performed.
Definition at line 80 of file src/GLSL/include/OgreGLSLLinkProgram.h.
|
private |
Flag indicating that the program object has tried to link and failed.
Definition at line 78 of file src/GLSL/include/OgreGLSLLinkProgram.h.
|
private |
Definition at line 69 of file src/GLSL/include/OgreGLSLLinkProgram.h.
|
private |
Flag to indicate that uniform references have already been built.
Definition at line 72 of file src/GLSL/include/OgreGLSLLinkProgram.h.
|
private |
Custom attribute bindings.
Definition at line 89 of file src/GLSL/include/OgreGLSLLinkProgram.h.
|
private |
Linked vertex program.
Definition at line 64 of file src/GLSL/include/OgreGLSLLinkProgram.h.