OGRE  1.9
Object-Oriented Graphics Rendering Engine
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Ogre::GLSL::GLSLLinkProgram Class Reference

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

#include <OgreGLSLLinkProgram.h>

+ Collaboration diagram for Ogre::GLSL::GLSLLinkProgram:

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

GLSLGpuProgrammFragmentProgram
 Linked fragment program. More...
 
GLSLGpuProgrammGeometryProgram
 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...
 
GLUniformCachemUniformCache
 
bool mUniformRefsBuilt
 Flag to indicate that uniform references have already been built. More...
 
AttributeSet mValidAttributes
 Custom attribute bindings. More...
 
GLSLGpuProgrammVertexProgram
 Linked vertex program. More...
 

Static Private Attributes

static CustomAttribute msCustomAttributes []
 

Detailed Description

C++ encapsulation of GLSL Program Object.

Definition at line 57 of file src/GLSL/include/OgreGLSLLinkProgram.h.

Member Typedef Documentation

typedef set<GLuint>::type Ogre::GLSL::GLSLLinkProgram::AttributeSet
private

Definition at line 87 of file src/GLSL/include/OgreGLSLLinkProgram.h.

Constructor & Destructor Documentation

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

Constructor should only be used by GLSLLinkProgramManager.

Ogre::GLSL::GLSLLinkProgram::~GLSLLinkProgram ( void  )

Member Function Documentation

void Ogre::GLSL::GLSLLinkProgram::activate ( void  )

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

void Ogre::GLSL::GLSLLinkProgram::buildGLUniformReferences ( void  )
private

Build uniform references from active named uniforms.

void Ogre::GLSL::GLSLLinkProgram::compileAndLink ( )
private

Compiles and links the the vertex and fragment programs.

void Ogre::GLSL::GLSLLinkProgram::extractAttributes ( void  )
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.

String Ogre::GLSL::GLSLLinkProgram::getCombinedName ( )
private
GLhandleARB Ogre::GLSL::GLSLLinkProgram::getGLHandle ( void  ) const
inline

Get the GL Handle for the program object.

Definition at line 126 of file src/GLSL/include/OgreGLSLLinkProgram.h.

void Ogre::GLSL::GLSLLinkProgram::getMicrocodeFromCache ( )
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?

bool Ogre::GLSL::GLSLLinkProgram::isSkeletalAnimationIncluded ( void  ) const
inline

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 142 of file src/GLSL/include/OgreGLSLLinkProgram.h.

void Ogre::GLSL::GLSLLinkProgram::setSkeletalAnimationIncluded ( bool  included)
inline

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 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.

Member Data Documentation

GLSLGpuProgram* Ogre::GLSL::GLSLLinkProgram::mFragmentProgram
private

Linked fragment program.

Definition at line 68 of file src/GLSL/include/OgreGLSLLinkProgram.h.

GLSLGpuProgram* Ogre::GLSL::GLSLLinkProgram::mGeometryProgram
private

Linked geometry program.

Definition at line 66 of file src/GLSL/include/OgreGLSLLinkProgram.h.

GLhandleARB Ogre::GLSL::GLSLLinkProgram::mGLHandle
private

GL handle for the program object.

Definition at line 74 of file src/GLSL/include/OgreGLSLLinkProgram.h.

GLUniformReferenceList Ogre::GLSL::GLSLLinkProgram::mGLUniformReferences
private

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

Definition at line 61 of file src/GLSL/include/OgreGLSLLinkProgram.h.

GLint Ogre::GLSL::GLSLLinkProgram::mLinked
private

Flag indicating that the program object has been successfully linked.

Definition at line 76 of file src/GLSL/include/OgreGLSLLinkProgram.h.

CustomAttribute Ogre::GLSL::GLSLLinkProgram::msCustomAttributes[]
staticprivate

Definition at line 100 of file src/GLSL/include/OgreGLSLLinkProgram.h.

bool Ogre::GLSL::GLSLLinkProgram::mSkeletalAnimation
private

Flag indicating skeletal animation is being performed.

Definition at line 80 of file src/GLSL/include/OgreGLSLLinkProgram.h.

bool Ogre::GLSL::GLSLLinkProgram::mTriedToLinkAndFailed
private

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

Definition at line 78 of file src/GLSL/include/OgreGLSLLinkProgram.h.

GLUniformCache* Ogre::GLSL::GLSLLinkProgram::mUniformCache
private

Definition at line 69 of file src/GLSL/include/OgreGLSLLinkProgram.h.

bool Ogre::GLSL::GLSLLinkProgram::mUniformRefsBuilt
private

Flag to indicate that uniform references have already been built.

Definition at line 72 of file src/GLSL/include/OgreGLSLLinkProgram.h.

AttributeSet Ogre::GLSL::GLSLLinkProgram::mValidAttributes
private

Custom attribute bindings.

Definition at line 89 of file src/GLSL/include/OgreGLSLLinkProgram.h.

GLSLGpuProgram* Ogre::GLSL::GLSLLinkProgram::mVertexProgram
private

Linked vertex program.

Definition at line 64 of file src/GLSL/include/OgreGLSLLinkProgram.h.


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