MeVisLabToolboxReference
SoGLShader Class Reference

Abstract base class for shader objects. More...

#include <SoGLShader.h>

Inheritance diagram for SoGLShader:
SoGLShaderObject SoGLShaderProgram SoGLCompleteShader

List of all members.

Public Member Functions

SbBool isContextStillValid (int context)
 Check if given context is still the same.
int getContext () const
 Returns Context Id, to which this object belongs.

Static Public Member Functions

static SbBool isSupported ()
 Returns 'TRUE' if vertex and fragment shaders are supported by OpenGL.
static void printCapabilities ()
 Prints capabilities of the OpenGL implementation.

Protected Member Functions

 SoGLShader ()
 Constructor.
virtual ~SoGLShader ()
 Destructor.
virtual void reset ()
 Free all resources (OpenGL too) and reset instance to initial state.
void errClear (const char *string=NULL) const
 Clear OpenGL error state and print any previously not displayed error message.
void errCheck (const char *string=NULL) const
 Check for OpenGL errors and print error message if one is found.
SbBool error (const char *string=NULL) const
 Returns 'TRUE' if OpenGL error is found.

Protected Attributes

GLuint _programHandle
int _context
 Context Id, to which this object belongs.

Detailed Description

Abstract base class for shader objects.

Definition at line 20 of file SoGLShader.h.


Constructor & Destructor Documentation

SoGLShader::SoGLShader ( ) [protected]

Constructor.

virtual SoGLShader::~SoGLShader ( ) [inline, protected, virtual]

Destructor.

Definition at line 48 of file SoGLShader.h.


Member Function Documentation

void SoGLShader::errCheck ( const char *  string = NULL) const [protected]

Check for OpenGL errors and print error message if one is found.

void SoGLShader::errClear ( const char *  string = NULL) const [protected]

Clear OpenGL error state and print any previously not displayed error message.

SbBool SoGLShader::error ( const char *  string = NULL) const [inline, protected]

Returns 'TRUE' if OpenGL error is found.

Definition at line 58 of file SoGLShader.h.

int SoGLShader::getContext ( ) const [inline]

Returns Context Id, to which this object belongs.

Definition at line 38 of file SoGLShader.h.

SbBool SoGLShader::isContextStillValid ( int  context) [inline]

Check if given context is still the same.

Definition at line 31 of file SoGLShader.h.

static SbBool SoGLShader::isSupported ( ) [static]

Returns 'TRUE' if vertex and fragment shaders are supported by OpenGL.

static void SoGLShader::printCapabilities ( ) [static]

Prints capabilities of the OpenGL implementation.

virtual void SoGLShader::reset ( ) [protected, virtual]

Free all resources (OpenGL too) and reset instance to initial state.

Reimplemented in SoGLShaderObject, and SoGLShaderProgram.


Member Data Documentation

int SoGLShader::_context [protected]

Context Id, to which this object belongs.

Definition at line 68 of file SoGLShader.h.

GLuint SoGLShader::_programHandle [protected]

Definition at line 62 of file SoGLShader.h.


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