Classes | Public Member Functions | Private Types | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
Ogre::GLSL::GLSLLinkProgram Class Reference

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

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

◆ AttributeSet

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

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

Constructor & Destructor Documentation

◆ GLSLLinkProgram()

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

Constructor should only be used by GLSLLinkProgramManager.

◆ ~GLSLLinkProgram()

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

Member Function Documentation

◆ activate()

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

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

◆ buildGLUniformReferences()

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

Build uniform references from active named uniforms.

◆ compileAndLink()

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

Compiles and links the the vertex and fragment programs.

◆ extractAttributes()

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

Extract attributes.

◆ getAttributeIndex()

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

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

◆ getCombinedName()

String Ogre::GLSL::GLSLLinkProgram::getCombinedName ( )
private

◆ getGLHandle()

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

Get the GL Handle for the program object.

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

◆ getMicrocodeFromCache()

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

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

◆ isAttributeValid()

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

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

◆ isSkeletalAnimationIncluded()

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

◆ setSkeletalAnimationIncluded()

void Ogre::GLSL::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 133 of file src/GLSL/include/OgreGLSLLinkProgram.h.

◆ updatePassIterationUniforms()

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.

◆ updateUniforms()

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

◆ mFragmentProgram

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

Linked fragment program.

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

◆ mGeometryProgram

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

Linked geometry program.

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

◆ mGLHandle

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

GL handle for the program object.

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

◆ mGLUniformReferences

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.

◆ mLinked

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.

◆ msCustomAttributes

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

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

◆ mSkeletalAnimation

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

Flag indicating skeletal animation is being performed.

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

◆ mTriedToLinkAndFailed

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.

◆ mUniformCache

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

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

◆ mUniformRefsBuilt

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.

◆ mValidAttributes

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

Custom attribute bindings.

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

◆ mVertexProgram

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:

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 Tue Apr 13 2021 08:53:15