OGRE 2.1
Object-Oriented Graphics Rendering Engine
Loading...
Searching...
No Matches
Ogre::GLSLESShader Class Reference

Specialisation of HighLevelGpuProgram to encapsulate shader objects obtained from compiled shaders written in the OpenGL Shader Language (GLSL ES) for OpenGL ES 2.0. More...

#include <OgreGLSLESShader.h>

+ Inheritance diagram for Ogre::GLSLESShader:

Classes

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

Public Member Functions

 GLSLESShader (ResourceManager *creator, const String &name, ResourceHandle handle, const String &group, bool isManual, ManualResourceLoader *loader)
 
 ~GLSLESShader ()
 
GpuProgram_getBindingDelegate (void)
 Since GLSL has no assembly, use this shader for binding.
 
void attachToProgramObject (const GLuint programObject)
 
void bind (void)
 Bind the shader in OpenGL.
 
void bindParameters (GpuProgramParametersSharedPtr params, uint16 mask)
 Execute the param binding functions for this shader.
 
void bindPassIterationParameters (GpuProgramParametersSharedPtr params)
 Execute the pass iteration param binding functions for this shader.
 
void bindSharedParameters (GpuProgramParametersSharedPtr params, uint16 mask)
 Execute the shared param binding functions for this shader.
 
bool compile (const bool checkErrors=false)
 Compile source into shader object.
 
GpuProgramParametersSharedPtr createParameters (void)
 Overridden from GpuProgram.
 
void detachFromProgramObject (const GLuint programObject)
 
GLuint getGLProgramHandle ()
 
GLuint getGLShaderHandle () const
 
GLenum getGLShaderType (GpuProgramType programType)
 Get OpenGL GLSL shader type from OGRE GPU program type.
 
bool getIsOptimised (void)
 Gets if the GLSL source has been optimised successfully.
 
const StringgetLanguage (void) const
 Overridden from GpuProgram.
 
String getOptimisedSource (void)
 Gets he optimised GLSL source.
 
bool getOptimiserEnabled (void) const
 Gets if the GLSL optimiser is enabled.
 
bool getPassFogStates (void) const
 
bool getPassSurfaceAndLightStates (void) const
 
bool getPassTransformStates (void) const
 Overridden.
 
const StringgetPreprocessorDefines (void) const
 Sets the preprocessor defines use to compile the program.
 
GLuint getShaderID (void) const
 Get the OGRE assigned shader ID.
 
String getShaderTypeLabel (GpuProgramType programType)
 Get a string containing the name of the GLSL shader type correspondening to the OGRE GPU program type.
 
GLint isLinked (void)
 Return the shader link status.
 
void setIsOptimised (bool flag)
 Sets if the GLSL source has been optimised successfully.
 
void setLinked (GLint flag)
 Set the shader link status.
 
void setOptimisedSource (const String &src)
 Sets the optimised GLSL source.
 
void setOptimiserEnabled (bool enabled)
 Sets if the GLSL optimiser is enabled.
 
void setPreprocessorDefines (const String &defines)
 Sets the preprocessor defines use to compile the program.
 
void unbind (void)
 Unbind the shader in OpenGL.
 

Static Public Member Functions

static void unbindAll (void)
 

Detailed Description

Specialisation of HighLevelGpuProgram to encapsulate shader objects obtained from compiled shaders written in the 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.

Constructor & Destructor Documentation

◆ GLSLESShader()

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

◆ ~GLSLESShader()

Ogre::GLSLESShader::~GLSLESShader ( )

Member Function Documentation

◆ _getBindingDelegate()

GpuProgram * Ogre::GLSLESShader::_getBindingDelegate ( void  )
inline

Since GLSL has no assembly, use this shader for binding.

◆ attachToProgramObject()

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

◆ bind()

void Ogre::GLSLESShader::bind ( void  )

Bind the shader in OpenGL.

◆ bindParameters()

void Ogre::GLSLESShader::bindParameters ( GpuProgramParametersSharedPtr  params,
uint16  mask 
)

Execute the param binding functions for this shader.

◆ bindPassIterationParameters()

void Ogre::GLSLESShader::bindPassIterationParameters ( GpuProgramParametersSharedPtr  params)

Execute the pass iteration param binding functions for this shader.

◆ bindSharedParameters()

void Ogre::GLSLESShader::bindSharedParameters ( GpuProgramParametersSharedPtr  params,
uint16  mask 
)

Execute the shared param binding functions for this shader.

◆ compile()

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

Compile source into shader object.

◆ createParameters()

GpuProgramParametersSharedPtr Ogre::GLSLESShader::createParameters ( void  )

Overridden from GpuProgram.

◆ detachFromProgramObject()

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

◆ getGLProgramHandle()

GLuint Ogre::GLSLESShader::getGLProgramHandle ( )

◆ getGLShaderHandle()

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

◆ getGLShaderType()

GLenum Ogre::GLSLESShader::getGLShaderType ( GpuProgramType  programType)

Get OpenGL GLSL shader type from OGRE GPU program type.

◆ getIsOptimised()

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

Gets if the GLSL source has been optimised successfully.

◆ getLanguage()

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

Overridden from GpuProgram.

◆ getOptimisedSource()

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

Gets he optimised GLSL source.

◆ getOptimiserEnabled()

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

Gets if the GLSL optimiser is enabled.

◆ getPassFogStates()

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

◆ getPassSurfaceAndLightStates()

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

◆ getPassTransformStates()

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

Overridden.

◆ getPreprocessorDefines()

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

Sets the preprocessor defines use to compile the program.

◆ getShaderID()

GLuint Ogre::GLSLESShader::getShaderID ( void  ) const
inline

Get the OGRE assigned shader ID.

◆ getShaderTypeLabel()

String Ogre::GLSLESShader::getShaderTypeLabel ( GpuProgramType  programType)

Get a string containing the name of the GLSL shader type correspondening to the OGRE GPU program type.

◆ isLinked()

GLint Ogre::GLSLESShader::isLinked ( void  )
inline

Return the shader link status.

Only used for separable programs.

◆ setIsOptimised()

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

Sets if the GLSL source has been optimised successfully.

◆ setLinked()

void Ogre::GLSLESShader::setLinked ( GLint  flag)
inline

Set the shader link status.

Only used for separable programs.

◆ setOptimisedSource()

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

Sets the optimised GLSL source.

◆ setOptimiserEnabled()

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

Sets if the GLSL optimiser is enabled.

◆ setPreprocessorDefines()

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

Sets the preprocessor defines use to compile the program.

◆ unbind()

void Ogre::GLSLESShader::unbind ( void  )

Unbind the shader in OpenGL.

◆ unbindAll()

static void Ogre::GLSLESShader::unbindAll ( void  )
static

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