Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | List of all members
Ogre::GLSLESProgramCommon Class Referenceabstract

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

#include <OgreGLSLESProgramCommon.h>

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

Public Member Functions

 GLSLESProgramCommon (GLSLESGpuProgram *vertexProgram, GLSLESGpuProgram *fragmentProgram)
 Constructor should only be used by GLSLESLinkProgramManager and GLSLESProgramPipelineManager. More...
 
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. More...
 
virtual GLint getAttributeIndex (VertexElementSemantic semantic, uint index)
 Get the index of a non-standard attribute bound in the linked code. More...
 
GLSLESGpuProgramgetFragmentProgram (void) const
 
GLuint getGLProgramHandle (void) const
 Get the GL Handle for the program object. More...
 
GLES2UniformCachegetUniformCache (void)
 
GLSLESGpuProgramgetVertexProgram (void) const
 
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...
 
virtual void updatePassIterationUniforms (GpuProgramParametersSharedPtr params)=0
 Updates program object uniforms using data from pass iteration GpuProgramParameters. More...
 
virtual void updateUniformBlocks (GpuProgramParametersSharedPtr params, uint16 mask, GpuProgramType fromProgType)=0
 Updates program object uniform blocks using data from GpuProgramParameters. More...
 
virtual void updateUniforms (GpuProgramParametersSharedPtr params, uint16 mask, GpuProgramType fromProgType)=0
 Updates program object uniforms using data from GpuProgramParameters. More...
 

Protected Types

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

Protected Member Functions

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

Protected Attributes

GLint mCustomAttributesIndexes [VES_COUNT][OGRE_MAX_TEXTURE_COORD_SETS]
 An array to hold the attributes indexes. More...
 
GLSLESGpuProgrammFragmentProgram
 Linked fragment program. More...
 
GLuint mGLProgramHandle
 GL handle for the program object. More...
 
GLUniformBufferList mGLUniformBufferReferences
 Container of uniform buffer references that are active in 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 or pipeline object has been successfully linked. More...
 
SemanticToStringMap mSemanticTypeMap
 
bool mSkeletalAnimation
 Flag indicating skeletal animation is being performed. More...
 
bool mTriedToLinkAndFailed
 Flag indicating that the program or pipeline object has tried to link and failed. More...
 
GLES2UniformCachemUniformCache
 
bool mUniformRefsBuilt
 Flag to indicate that uniform references have already been built. More...
 
GLSLESGpuProgrammVertexProgram
 Linked vertex program. More...
 

Detailed Description

C++ encapsulation of GLSL ES Program Object.

Definition at line 62 of file OgreGLSLESProgramCommon.h.

Member Typedef Documentation

◆ AttributeSet

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

Definition at line 88 of file OgreGLSLESProgramCommon.h.

◆ SemanticToStringMap

Definition at line 105 of file OgreGLSLESProgramCommon.h.

Constructor & Destructor Documentation

◆ GLSLESProgramCommon()

Ogre::GLSLESProgramCommon::GLSLESProgramCommon ( GLSLESGpuProgram vertexProgram,
GLSLESGpuProgram fragmentProgram 
)

Constructor should only be used by GLSLESLinkProgramManager and GLSLESProgramPipelineManager.

◆ ~GLSLESProgramCommon()

virtual Ogre::GLSLESProgramCommon::~GLSLESProgramCommon ( void  )
virtual

Member Function Documentation

◆ _useProgram()

virtual void Ogre::GLSLESProgramCommon::_useProgram ( void  )
protectedpure virtual

Put a program in use.

Implemented in Ogre::GLSLESProgramPipeline.

◆ activate()

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.

◆ buildGLUniformReferences()

void Ogre::GLSLESProgramCommon::buildGLUniformReferences ( void  )
protected

Build uniform references from active named uniforms.

◆ compileAndLink()

virtual void Ogre::GLSLESProgramCommon::compileAndLink ( void  )
protectedpure virtual

Compiles and links the vertex and fragment programs.

Implemented in Ogre::GLSLESProgramPipeline.

◆ getAttributeIndex()

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.

◆ getAttributeSemanticEnum()

VertexElementSemantic Ogre::GLSLESProgramCommon::getAttributeSemanticEnum ( String  type)
protected

◆ getAttributeSemanticString()

const char* Ogre::GLSLESProgramCommon::getAttributeSemanticString ( VertexElementSemantic  semantic)
protected

◆ getCombinedName()

Ogre::String Ogre::GLSLESProgramCommon::getCombinedName ( void  )
protected

◆ getFragmentProgram()

GLSLESGpuProgram* Ogre::GLSLESProgramCommon::getFragmentProgram ( void  ) const

Definition at line 156 of file OgreGLSLESProgramCommon.h.

◆ getGLProgramHandle()

GLuint Ogre::GLSLESProgramCommon::getGLProgramHandle ( void  ) const

Get the GL Handle for the program object.

Definition at line 133 of file OgreGLSLESProgramCommon.h.

◆ getMicrocodeFromCache()

void Ogre::GLSLESProgramCommon::getMicrocodeFromCache ( void  )
protected

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

◆ getUniformCache()

GLES2UniformCache* Ogre::GLSLESProgramCommon::getUniformCache ( void  )

Definition at line 157 of file OgreGLSLESProgramCommon.h.

◆ getVertexProgram()

GLSLESGpuProgram* Ogre::GLSLESProgramCommon::getVertexProgram ( void  ) const

Definition at line 155 of file OgreGLSLESProgramCommon.h.

◆ isAttributeValid()

bool Ogre::GLSLESProgramCommon::isAttributeValid ( VertexElementSemantic  semantic,
uint  index 
)

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

◆ isSkeletalAnimationIncluded()

bool Ogre::GLSLESProgramCommon::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 148 of file OgreGLSLESProgramCommon.h.

◆ setSkeletalAnimationIncluded()

void Ogre::GLSLESProgramCommon::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 140 of file OgreGLSLESProgramCommon.h.

◆ updatePassIterationUniforms()

virtual void Ogre::GLSLESProgramCommon::updatePassIterationUniforms ( GpuProgramParametersSharedPtr  params)
pure virtual

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.

◆ updateUniformBlocks()

virtual void Ogre::GLSLESProgramCommon::updateUniformBlocks ( GpuProgramParametersSharedPtr  params,
uint16  mask,
GpuProgramType  fromProgType 
)
pure virtual

Updates program object uniform blocks using data from GpuProgramParameters.

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

Implemented in Ogre::GLSLESProgramPipeline.

◆ updateUniforms()

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.

Member Data Documentation

◆ mCustomAttributesIndexes

GLint Ogre::GLSLESProgramCommon::mCustomAttributesIndexes[VES_COUNT][OGRE_MAX_TEXTURE_COORD_SETS]
protected

An array to hold the attributes indexes.

Definition at line 91 of file OgreGLSLESProgramCommon.h.

◆ mFragmentProgram

GLSLESGpuProgram* Ogre::GLSLESProgramCommon::mFragmentProgram
protected

Linked fragment program.

Definition at line 73 of file OgreGLSLESProgramCommon.h.

◆ mGLProgramHandle

GLuint Ogre::GLSLESProgramCommon::mGLProgramHandle
protected

GL handle for the program object.

Definition at line 78 of file OgreGLSLESProgramCommon.h.

◆ mGLUniformBufferReferences

GLUniformBufferList Ogre::GLSLESProgramCommon::mGLUniformBufferReferences
protected

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

Definition at line 68 of file OgreGLSLESProgramCommon.h.

◆ mGLUniformReferences

GLUniformReferenceList Ogre::GLSLESProgramCommon::mGLUniformReferences
protected

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

Definition at line 66 of file OgreGLSLESProgramCommon.h.

◆ mLinked

GLint Ogre::GLSLESProgramCommon::mLinked
protected

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

Definition at line 80 of file OgreGLSLESProgramCommon.h.

◆ mSemanticTypeMap

SemanticToStringMap Ogre::GLSLESProgramCommon::mSemanticTypeMap
protected

Definition at line 106 of file OgreGLSLESProgramCommon.h.

◆ mSkeletalAnimation

bool Ogre::GLSLESProgramCommon::mSkeletalAnimation
protected

Flag indicating skeletal animation is being performed.

Definition at line 84 of file OgreGLSLESProgramCommon.h.

◆ mTriedToLinkAndFailed

bool Ogre::GLSLESProgramCommon::mTriedToLinkAndFailed
protected

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

Definition at line 82 of file OgreGLSLESProgramCommon.h.

◆ mUniformCache

GLES2UniformCache* Ogre::GLSLESProgramCommon::mUniformCache
protected

Definition at line 74 of file OgreGLSLESProgramCommon.h.

◆ mUniformRefsBuilt

bool Ogre::GLSLESProgramCommon::mUniformRefsBuilt
protected

Flag to indicate that uniform references have already been built.

Definition at line 76 of file OgreGLSLESProgramCommon.h.

◆ mVertexProgram

GLSLESGpuProgram* Ogre::GLSLESProgramCommon::mVertexProgram
protected

Linked vertex program.

Definition at line 71 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 Oct 22 2017 04:04:15