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.
GLSLGpuProgram * | mVertexProgram
| Linked vertex program.
GLSLGpuProgram * | mGeometryProgram
| Linked geometry program.
GLSLGpuProgram * | mFragmentProgram
| 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.

Ogre::GLSLLinkProgram::~GLSLLinkProgram | ( | void |  | ) |

## Member Function Documentation

void Ogre::GLSLLinkProgram::activate | ( | void |  | ) |

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

void Ogre::GLSLLinkProgram::buildGLUniformReferences | ( | void |  | ) | `[private]`

Build uniform references from active named uniforms.

void Ogre::GLSLLinkProgram::compileAndLink | ( |  | ) | `[private]`

Compiles and links the the vertex and fragment programs.

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

Extract attributes.

GLuint Ogre::GLSLLinkProgram::getAttributeIndex | ( | VertexElementSemantic | semantic,
|  | uint | index
| ) |  |

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

String Ogre::GLSLLinkProgram::getCombinedName | ( |  | ) | `[private]`

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

Get the GL Handle for the program object.

Definition at line 122 of file OgreGLSLLinkProgram.h.

void Ogre::GLSLLinkProgram::getMicrocodeFromCache | ( |  | ) | `[private]`

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

bool Ogre::GLSLLinkProgram::isAttributeValid | ( | VertexElementSemantic | semantic,
|  | uint | index
| ) |  |

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

bool Ogre::GLSLLinkProgram::isSkeletalAnimationIncluded | ( | void |  | ) | const

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.

void Ogre::GLSLLinkProgram::setSkeletalAnimationIncluded | ( | bool | included | ) |

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.

void Ogre::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::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::GLSLLinkProgram::mFragmentProgram `[private]`

Linked fragment program.

Definition at line 65 of file OgreGLSLLinkProgram.h.

GLSLGpuProgram* Ogre::GLSLLinkProgram::mGeometryProgram `[private]`

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.

GLUniformReferenceList Ogre::GLSLLinkProgram::mGLUniformReferences `[private]`

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

Definition at line 58 of file OgreGLSLLinkProgram.h.

GLint Ogre::GLSLLinkProgram::mLinked `[private]`

Flag indicating that the program object has been successfully linked.

Definition at line 72 of file OgreGLSLLinkProgram.h.

CustomAttribute Ogre::GLSLLinkProgram::msCustomAttributes[]`[static, private]`

Definition at line 96 of file OgreGLSLLinkProgram.h.

bool Ogre::GLSLLinkProgram::mSkeletalAnimation `[private]`

Flag indicating skeletal animation is being performed.

Definition at line 76 of file OgreGLSLLinkProgram.h.

bool Ogre::GLSLLinkProgram::mTriedToLinkAndFailed `[private]`

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

Definition at line 74 of file OgreGLSLLinkProgram.h.

bool Ogre::GLSLLinkProgram::mUniformRefsBuilt `[private]`

Flag to indicate that uniform references have already been built.

Definition at line 68 of file OgreGLSLLinkProgram.h.

AttributeSet Ogre::GLSLLinkProgram::mValidAttributes `[private]`

Custom attribute bindings.

Definition at line 85 of file OgreGLSLLinkProgram.h.

GLSLGpuProgram* Ogre::GLSLLinkProgram::mVertexProgram `[private]`

Linked vertex program.

Definition at line 61 of file OgreGLSLLinkProgram.h.

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

- OgreGLSLLinkProgram.h

Copyright © 2012 Torus Knot Software Ltd
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.
Last modified Sun Sep 2 2012 07:27:55