OGRE  2.1.0unstable
Object-Oriented Graphics Rendering Engine
Ogre::GLSLESProgram Class Reference

Specialisation of HighLevelGpuProgram to provide support for OpenGL Shader Language (GLSL ES) for OpenGL ES 2.0. More...

#include <OgreGLSLESProgram.h>

+ Inheritance diagram for Ogre::GLSLESProgram:

Classes

class  CmdOptimisation
 Command object for running the GLSL optimiser. More...
 
class  CmdPreprocessorDefines
 Command object for setting macro defines. More...
 

Public Member Functions

 GLSLESProgram (ResourceManager *creator, const String &name, ResourceHandle handle, const String &group, bool isManual, ManualResourceLoader *loader)
 
 ~GLSLESProgram ()
 
void attachToProgramObject (const GLuint programObject)
 
bool compile (const bool checkErrors=false)
 compile source into shader object More...
 
GpuProgramParametersSharedPtr createParameters (void)
 Overridden from GpuProgram. More...
 
void detachFromProgramObject (const GLuint programObject)
 
GLuint getGLProgramHandle () const
 
GLuint getGLShaderHandle () const
 GL Shader Handle. More...
 
bool getIsOptimised (void)
 Gets if the GLSL source has been optimised successfully. More...
 
const StringgetLanguage (void) const
 Overridden from GpuProgram. More...
 
String getOptimisedSource (void)
 Gets he optimised GLSL source. More...
 
bool getOptimiserEnabled (void) const
 Gets if the GLSL optimiser is enabled. More...
 
bool getPassFogStates (void) const
 
bool getPassSurfaceAndLightStates (void) const
 
bool getPassTransformStates (void) const
 Overridden. More...
 
const StringgetPreprocessorDefines (void) const
 Sets the preprocessor defines use to compile the program. More...
 
void setIsOptimised (bool flag)
 Sets if the GLSL source has been optimised successfully. More...
 
void setOptimisedSource (const String &src)
 Sets the optimised GLSL source. More...
 
void setOptimiserEnabled (bool enabled)
 Sets if the GLSL optimiser is enabled. More...
 
void setPreprocessorDefines (const String &defines)
 Sets the preprocessor defines use to compile the program. More...
 

Detailed Description

Specialisation of HighLevelGpuProgram to provide support for OpenGL Shader Language (GLSL ES) for OpenGL ES 2.0.

Remarks
GLSL ES has no target assembler or entry point specification like DirectX 9 HLSL. Vertex and Fragment shaders only have one entry point called "main".
When a shader is compiled, microcode is generated but can not be accessed by the application. GLSL ES also does not provide assembler low level output after compiling. The GL ES Render system assumes that the Gpu program is a GL Gpu program so GLSLESProgram will create a GLSLESGpuProgram that is subclassed from GLES2GpuProgram for the low level implementation. The GLES2Program class will create a shader object and compile the source but will not create a program object. It's up to GLES2GpuProgram class to request a program object to link the shader object to.

Constructor & Destructor Documentation

◆ GLSLESProgram()

Ogre::GLSLESProgram::GLSLESProgram ( ResourceManager creator,
const String name,
ResourceHandle  handle,
const String group,
bool  isManual,
ManualResourceLoader loader 
)

◆ ~GLSLESProgram()

Ogre::GLSLESProgram::~GLSLESProgram ( )

Member Function Documentation

◆ attachToProgramObject()

void Ogre::GLSLESProgram::attachToProgramObject ( const GLuint  programObject)

◆ compile()

bool Ogre::GLSLESProgram::compile ( const bool  checkErrors = false)

compile source into shader object

◆ createParameters()

GpuProgramParametersSharedPtr Ogre::GLSLESProgram::createParameters ( void  )

Overridden from GpuProgram.

◆ detachFromProgramObject()

void Ogre::GLSLESProgram::detachFromProgramObject ( const GLuint  programObject)

◆ getGLProgramHandle()

GLuint Ogre::GLSLESProgram::getGLProgramHandle ( ) const
inline

◆ getGLShaderHandle()

GLuint Ogre::GLSLESProgram::getGLShaderHandle ( ) const
inline

GL Shader Handle.

◆ getIsOptimised()

bool Ogre::GLSLESProgram::getIsOptimised ( void  )
inline

Gets if the GLSL source has been optimised successfully.

◆ getLanguage()

const String& Ogre::GLSLESProgram::getLanguage ( void  ) const

Overridden from GpuProgram.

◆ getOptimisedSource()

String Ogre::GLSLESProgram::getOptimisedSource ( void  )
inline

Gets he optimised GLSL source.

◆ getOptimiserEnabled()

bool Ogre::GLSLESProgram::getOptimiserEnabled ( void  ) const
inline

Gets if the GLSL optimiser is enabled.

◆ getPassFogStates()

bool Ogre::GLSLESProgram::getPassFogStates ( void  ) const

◆ getPassSurfaceAndLightStates()

bool Ogre::GLSLESProgram::getPassSurfaceAndLightStates ( void  ) const

◆ getPassTransformStates()

bool Ogre::GLSLESProgram::getPassTransformStates ( void  ) const

Overridden.

◆ getPreprocessorDefines()

const String& Ogre::GLSLESProgram::getPreprocessorDefines ( void  ) const
inline

Sets the preprocessor defines use to compile the program.

◆ setIsOptimised()

void Ogre::GLSLESProgram::setIsOptimised ( bool  flag)
inline

Sets if the GLSL source has been optimised successfully.

◆ setOptimisedSource()

void Ogre::GLSLESProgram::setOptimisedSource ( const String src)
inline

Sets the optimised GLSL source.

◆ setOptimiserEnabled()

void Ogre::GLSLESProgram::setOptimiserEnabled ( bool  enabled)

Sets if the GLSL optimiser is enabled.

◆ setPreprocessorDefines()

void Ogre::GLSLESProgram::setPreprocessorDefines ( const String defines)
inline

Sets the preprocessor defines use to compile the program.


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