Classes | Public Member Functions | Private Types | Private Member Functions | Private Attributes | Static Private Attributes
Ogre::GLSLLinkProgram Class Reference

C++ encapsulation of GLSL Program Object. More...

#include <OgreGLSLLinkProgram.h>

List of all members.

Classes

struct  CustomAttribute
 Name / attribute list. More...

Public Member Functions

 GLSLLinkProgram (GLSLGpuProgram *vertexProgram, GLSLGpuProgram *geometryProgram, GLSLGpuProgram *fragmentProgram)
 Constructor should only be used by GLSLLinkProgramManager.
 ~GLSLLinkProgram (void)
void activate (void)
 Makes a program object active by making sure it is linked and then putting it in use.
void updateUniforms (GpuProgramParametersSharedPtr params, uint16 mask, GpuProgramType fromProgType)
 Updates program object uniforms using data from GpuProgramParameters.
void updatePassIterationUniforms (GpuProgramParametersSharedPtr params)
 Updates program object uniforms using data from pass iteration GpuProgramParameters.
GLhandleARB getGLHandle (void) const
 Get the GL Handle for the program object.
void setSkeletalAnimationIncluded (bool included)
 Sets whether the linked program includes the required instructions to perform skeletal animation.
bool isSkeletalAnimationIncluded (void) const
 Returns whether the linked program includes the required instructions to perform skeletal animation.
GLuint getAttributeIndex (VertexElementSemantic semantic, uint index)
 Get the index of a non-standard attribute bound in the linked code.
bool isAttributeValid (VertexElementSemantic semantic, uint index)
 Is a non-standard attribute bound in the linked code?

Private Types

typedef set< GLuint >::type AttributeSet

Private Member Functions

void buildGLUniformReferences (void)
 Build uniform references from active named uniforms.
void extractAttributes (void)
 Extract attributes.
String getCombinedName ()
void compileAndLink ()
 Compiles and links the the vertex and fragment programs.
void getMicrocodeFromCache ()
 Get the the binary data of a program from the microcode cache.

Private Attributes

GLUniformReferenceList mGLUniformReferences
 Container of uniform references that are active in the program object.
GLSLGpuProgrammVertexProgram
 Linked vertex program.
GLSLGpuProgrammGeometryProgram
 Linked geometry program.
GLSLGpuProgrammFragmentProgram
 Linked fragment program.
bool mUniformRefsBuilt
 Flag to indicate that uniform references have already been built.
GLhandleARB mGLHandle
 GL handle for the program object.
GLint mLinked
 Flag indicating that the program object has been successfully linked.
bool mTriedToLinkAndFailed
 Flag indicating that the program object has tried to link and failed.
bool mSkeletalAnimation
 Flag indicating skeletal animation is being performed.
AttributeSet mValidAttributes
 Custom attribute bindings.

Static Private Attributes

static CustomAttribute msCustomAttributes []

Detailed Description

C++ encapsulation of GLSL Program Object.

Definition at line 54 of file OgreGLSLLinkProgram.h.


Member Typedef Documentation

typedef set<GLuint>::type Ogre::GLSLLinkProgram::AttributeSet [private]

Definition at line 83 of file OgreGLSLLinkProgram.h.


Constructor & Destructor Documentation

Ogre::GLSLLinkProgram::GLSLLinkProgram ( GLSLGpuProgram vertexProgram,
GLSLGpuProgram geometryProgram,
GLSLGpuProgram fragmentProgram 
)

Constructor should only be used by GLSLLinkProgramManager.


Member Function Documentation

Makes a program object active by making sure it is linked and then putting it in use.

Build uniform references from active named uniforms.

Compiles and links the the vertex and fragment programs.

void Ogre::GLSLLinkProgram::extractAttributes ( void  ) [private]

Extract attributes.

Get the index of a non-standard attribute bound in the linked code.

GLhandleARB Ogre::GLSLLinkProgram::getGLHandle ( void  ) const

Get the GL Handle for the program object.

Definition at line 122 of file OgreGLSLLinkProgram.h.

Get the the binary data of a program from the microcode cache.

Is a non-standard attribute bound in the linked code?

Returns whether the linked program includes the required instructions to perform skeletal animation.

Remarks:
If this returns true, OGRE will not blend the geometry according to skeletal animation, it will expect the vertex program to do it.

Definition at line 138 of file OgreGLSLLinkProgram.h.

Sets whether the linked program includes the required instructions to perform skeletal animation.

Remarks:
If this is set to true, OGRE will not blend the geometry according to skeletal animation, it will expect the vertex program to do it.

Definition at line 129 of file OgreGLSLLinkProgram.h.

Updates program object uniforms using data from pass iteration GpuProgramParameters.

normally called by GLSLGpuProgram::bindMultiPassParameters() just before multi pass rendering occurs.

Updates program object uniforms using data from GpuProgramParameters.

normally called by GLSLGpuProgram::bindParameters() just before rendering occurs.


Member Data Documentation

Linked fragment program.

Definition at line 65 of file OgreGLSLLinkProgram.h.

Linked geometry program.

Definition at line 63 of file OgreGLSLLinkProgram.h.

GLhandleARB Ogre::GLSLLinkProgram::mGLHandle [private]

GL handle for the program object.

Definition at line 70 of file OgreGLSLLinkProgram.h.

Container of uniform references that are active in the program object.

Definition at line 58 of file OgreGLSLLinkProgram.h.

Flag indicating that the program object has been successfully linked.

Definition at line 72 of file OgreGLSLLinkProgram.h.

Definition at line 96 of file OgreGLSLLinkProgram.h.

Flag indicating skeletal animation is being performed.

Definition at line 76 of file OgreGLSLLinkProgram.h.

Flag indicating that the program object has tried to link and failed.

Definition at line 74 of file OgreGLSLLinkProgram.h.

Flag to indicate that uniform references have already been built.

Definition at line 68 of file OgreGLSLLinkProgram.h.

Custom attribute bindings.

Definition at line 85 of file OgreGLSLLinkProgram.h.

Linked vertex program.

Definition at line 61 of file OgreGLSLLinkProgram.h.


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

Copyright © 2012 Torus Knot Software Ltd
Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.
Last modified Fri May 25 2012 21:49:22