Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes
Ogre::GLSLESProgramCommon Class Reference

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

#include <OgreGLSLESProgramCommon.h>

Inheritance diagram for Ogre::GLSLESProgramCommon:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 GLSLESProgramCommon (GLSLESGpuProgram *vertexProgram, GLSLESGpuProgram *fragmentProgram)
 Constructor should only be used by GLSLESLinkProgramManager and GLSLESProgramPipelineManager.
virtual ~GLSLESProgramCommon (void)
virtual void activate (void)=0
 Makes a program object active by making sure it is linked and then putting it in use.
virtual void updateUniforms (GpuProgramParametersSharedPtr params, uint16 mask, GpuProgramType fromProgType)=0
 Updates program object uniforms using data from GpuProgramParameters.
virtual void updatePassIterationUniforms (GpuProgramParametersSharedPtr params)=0
 Updates program object uniforms using data from pass iteration GpuProgramParameters.
GLuint getGLProgramHandle (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.
virtual GLint 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?
GLSLESGpuProgramgetVertexProgram (void) const
GLSLESGpuProgramgetFragmentProgram (void) const

Protected Types

typedef set< GLuint >::type AttributeSet
typedef map< String,
VertexElementSemantic >::type 
SemanticToStringMap

Protected Member Functions

void buildGLUniformReferences (void)
 Build uniform references from active named uniforms.
Ogre::String getCombinedName (void)
void getMicrocodeFromCache (void)
 Get the the binary data of a program from the microcode cache.
virtual void compileAndLink (void)=0
 Compiles and links the vertex and fragment programs.
virtual void _useProgram (void)=0
 Put a program in use.
VertexElementSemantic getAttributeSemanticEnum (String type)
const char * getAttributeSemanticString (VertexElementSemantic semantic)

Protected Attributes

GLUniformReferenceList mGLUniformReferences
 Container of uniform references that are active in the program object.
GLSLESGpuProgrammVertexProgram
 Linked vertex program.
GLSLESGpuProgrammFragmentProgram
 Linked fragment program.
bool mUniformRefsBuilt
 Flag to indicate that uniform references have already been built.
GLuint mGLProgramHandle
 GL handle for the program object.
GLint mLinked
 Flag indicating that the program or pipeline object has been successfully linked.
bool mTriedToLinkAndFailed
 Flag indicating that the program or pipeline object has tried to link and failed.
bool mSkeletalAnimation
 Flag indicating skeletal animation is being performed.
GLint mCustomAttributesIndexes [VES_COUNT][OGRE_MAX_TEXTURE_COORD_SETS]
 An array to hold the attributes indexes.
SemanticToStringMap mSemanticTypeMap

Detailed Description

C++ encapsulation of GLSL ES Program Object.

Definition at line 57 of file OgreGLSLESProgramCommon.h.


Member Typedef Documentation

typedef set<GLuint>::type Ogre::GLSLESProgramCommon::AttributeSet [protected]

Definition at line 80 of file OgreGLSLESProgramCommon.h.

Definition at line 97 of file OgreGLSLESProgramCommon.h.


Constructor & Destructor Documentation

Constructor should only be used by GLSLESLinkProgramManager and GLSLESProgramPipelineManager.


Member Function Documentation

virtual void Ogre::GLSLESProgramCommon::_useProgram ( void  ) [protected, pure virtual]

Put a program in use.

Implemented in Ogre::GLSLESProgramPipeline, and Ogre::GLSLESLinkProgram.

virtual void Ogre::GLSLESProgramCommon::activate ( void  ) [pure virtual]

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

Implemented in Ogre::GLSLESProgramPipeline, and Ogre::GLSLESLinkProgram.

Build uniform references from active named uniforms.

Reimplemented in Ogre::GLSLESProgramPipeline, and Ogre::GLSLESLinkProgram.

virtual void Ogre::GLSLESProgramCommon::compileAndLink ( void  ) [protected, pure virtual]

Compiles and links the vertex and fragment programs.

Implemented in Ogre::GLSLESProgramPipeline, and Ogre::GLSLESLinkProgram.

virtual GLint Ogre::GLSLESProgramCommon::getAttributeIndex ( VertexElementSemantic  semantic,
uint  index 
) [virtual]

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

Reimplemented in Ogre::GLSLESProgramPipeline.

Definition at line 144 of file OgreGLSLESProgramCommon.h.

Get the GL Handle for the program object.

Definition at line 121 of file OgreGLSLESProgramCommon.h.

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

Definition at line 143 of file OgreGLSLESProgramCommon.h.

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 136 of file OgreGLSLESProgramCommon.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 128 of file OgreGLSLESProgramCommon.h.

Updates program object uniforms using data from pass iteration GpuProgramParameters.

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

Implemented in Ogre::GLSLESProgramPipeline, and Ogre::GLSLESLinkProgram.

virtual void Ogre::GLSLESProgramCommon::updateUniforms ( GpuProgramParametersSharedPtr  params,
uint16  mask,
GpuProgramType  fromProgType 
) [pure virtual]

Updates program object uniforms using data from GpuProgramParameters.

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

Implemented in Ogre::GLSLESProgramPipeline, and Ogre::GLSLESLinkProgram.


Member Data Documentation

An array to hold the attributes indexes.

Definition at line 83 of file OgreGLSLESProgramCommon.h.

Linked fragment program.

Definition at line 66 of file OgreGLSLESProgramCommon.h.

GL handle for the program object.

Definition at line 70 of file OgreGLSLESProgramCommon.h.

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

Definition at line 61 of file OgreGLSLESProgramCommon.h.

Flag indicating that the program or pipeline object has been successfully linked.

Definition at line 72 of file OgreGLSLESProgramCommon.h.

Definition at line 98 of file OgreGLSLESProgramCommon.h.

Flag indicating skeletal animation is being performed.

Definition at line 76 of file OgreGLSLESProgramCommon.h.

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

Definition at line 74 of file OgreGLSLESProgramCommon.h.

Flag to indicate that uniform references have already been built.

Definition at line 68 of file OgreGLSLESProgramCommon.h.

Linked vertex program.

Definition at line 64 of file OgreGLSLESProgramCommon.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 Sun Sep 2 2012 07:28:04