OpenSceneGraph  3.4.0
Public Member Functions | Protected Member Functions | Protected Attributes
osg::Shader::PerContextShader Class Reference

PerContextShader (PCS) is an OSG-internal encapsulation of glShader per-GL context. More...

Inheritance diagram for osg::Shader::PerContextShader:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 PerContextShader (const Shader *shader, unsigned int contextID)
void setDefineString (const std::string &defStr)
const std::string & getDefineString () const
GLuint getHandle () const
void requestCompile ()
void compileShader (osg::State &state)
bool needsCompile () const
bool isCompiled () const
bool getInfoLog (std::string &infoLog) const
void attachShader (GLuint program) const
 Attach our glShader to a glProgram.
void detachShader (GLuint program) const
 Detach our glShader from a glProgram.

Protected Member Functions

 ~PerContextShader ()

Protected Attributes

const Shader_shader
 Pointer to our parent osg::Shader.
osg::ref_ptr< osg::GLExtensions_extensions
 Pointer to this context's extension functions.
GLuint _glShaderHandle
 Handle to the actual glShader.
std::string _defineStr
 Define string passed on to Shaders to help configure them.
bool _needsCompile
 Does our glShader need to be recompiled?
bool _isCompiled
 Is our glShader successfully compiled?
const unsigned int _contextID

Detailed Description

PerContextShader (PCS) is an OSG-internal encapsulation of glShader per-GL context.


Constructor & Destructor Documentation

osg::Shader::PerContextShader::PerContextShader ( const Shader shader,
unsigned int  contextID 
)

Member Function Documentation

Attach our glShader to a glProgram.

Detach our glShader from a glProgram.

const std::string& osg::Shader::PerContextShader::getDefineString ( ) const [inline]
GLuint osg::Shader::PerContextShader::getHandle ( ) const [inline]
bool osg::Shader::PerContextShader::getInfoLog ( std::string &  infoLog) const
void osg::Shader::PerContextShader::setDefineString ( const std::string &  defStr) [inline]

Member Data Documentation

const unsigned int osg::Shader::PerContextShader::_contextID [protected]

Define string passed on to Shaders to help configure them.

Pointer to this context's extension functions.

Handle to the actual glShader.

Is our glShader successfully compiled?

Does our glShader need to be recompiled?

Pointer to our parent osg::Shader.


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

osg logo
Generated at Tue Dec 8 2015 00:14:25 for the OpenSceneGraph by doxygen 1.7.6.1.