OGRE  1.10.8
Object-Oriented Graphics Rendering Engine
Ogre::GLSL::GLSLProgram Class Reference

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

#include <OgreGLSLProgram.h>

+ Inheritance diagram for Ogre::GLSL::GLSLProgram:

Public Member Functions

 GLSLProgram (ResourceManager *creator, const String &name, ResourceHandle handle, const String &group, bool isManual, ManualResourceLoader *loader)
 
 ~GLSLProgram ()
 
void attachToProgramObject (const GLhandleARB programObject)
 
bool compile (bool checkErrors=true)
 compile source into shader object More...
 
void detachFromProgramObject (const GLhandleARB programObject)
 
GLhandleARB getGLHandle () const
 
const StringgetLanguage (void) const
 Overridden from GpuProgram. More...
 

Detailed Description

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

Remarks
GLSL 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 also does not provide assembler low level output after compiling. The GL Render system assumes that the Gpu program is a GL Gpu program so GLSLProgram will create a GLSLGpuProgram that is subclassed from GLGpuProgram for the low level implementation. The GLSLProgram class will create a shader object and compile the source but will not create a program object. It's up to GLSLGpuProgram class to request a program object to link the shader object to.
Note
GLSL supports multiple modular shader objects that can be attached to one program object to form a single shader. This is supported through the "attach" material script command. All the modules to be attached are listed on the same line as the attach command separated by white space.

Constructor & Destructor Documentation

◆ GLSLProgram()

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

◆ ~GLSLProgram()

Ogre::GLSL::GLSLProgram::~GLSLProgram ( )

Member Function Documentation

◆ getGLHandle()

GLhandleARB Ogre::GLSL::GLSLProgram::getGLHandle ( ) const
inline

◆ attachToProgramObject()

void Ogre::GLSL::GLSLProgram::attachToProgramObject ( const GLhandleARB  programObject)

◆ detachFromProgramObject()

void Ogre::GLSL::GLSLProgram::detachFromProgramObject ( const GLhandleARB  programObject)

◆ getLanguage()

const String& Ogre::GLSL::GLSLProgram::getLanguage ( void  ) const

Overridden from GpuProgram.

◆ compile()

bool Ogre::GLSL::GLSLProgram::compile ( bool  checkErrors = true)

compile source into shader object


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