MeVisLabToolboxReference
SoGLCompleteShader Class Reference

Shader class which directly takes src for vertex, geometry and/or fragment shader, compiles and links it. More...

#include <SoGLCompleteShader.h>

Inheritance diagram for SoGLCompleteShader:
SoGLShaderProgram SoGLShader SoUniformParameterBase

List of all members.

Public Member Functions

 SoGLCompleteShader ()
 ~SoGLCompleteShader ()
bool create (const char *srcVert, const char *srcGeom, const char *srcFrag)
 Creates the shaders and links them. If one does not need a specific shader, just pass NULL.
bool update (const char *srcVert, const char *srcGeom, const char *srcFrag)
 Updates the shaders source. Pass NULL for shaders that you don't want to update.
void bindTexture (const char *name, SoGLTexture *texture, int unit=-1)
 binds the given texture, if unit == -1 a unit is automatically assigned by the shader
void enable (unsigned int context)
 enables the shader, resets the assigned texture units
void enable ()
 enables the shader, using the current cache context from ml::OpenGL
bool isValid ()
 returns if the shader is valid or need re-creation

Public Attributes

SoGLShaderObjectm_pVertSh
 The GLSL shader objects for vertex, geometry and fragment programs.
SoGLShaderObjectm_pGeomSh
SoGLShaderObjectm_pFragSh

Detailed Description

Shader class which directly takes src for vertex, geometry and/or fragment shader, compiles and links it.

Definition at line 25 of file SoGLCompleteShader.h.


Constructor & Destructor Documentation

SoGLCompleteShader::SoGLCompleteShader ( ) [inline]

Definition at line 34 of file SoGLCompleteShader.h.

SoGLCompleteShader::~SoGLCompleteShader ( )

Member Function Documentation

void SoGLCompleteShader::bindTexture ( const char *  name,
SoGLTexture *  texture,
int  unit = -1 
)

binds the given texture, if unit == -1 a unit is automatically assigned by the shader

bool SoGLCompleteShader::create ( const char *  srcVert,
const char *  srcGeom,
const char *  srcFrag 
)

Creates the shaders and links them. If one does not need a specific shader, just pass NULL.

void SoGLCompleteShader::enable ( )

enables the shader, using the current cache context from ml::OpenGL

void SoGLCompleteShader::enable ( unsigned int  context)

enables the shader, resets the assigned texture units

bool SoGLCompleteShader::isValid ( )

returns if the shader is valid or need re-creation

bool SoGLCompleteShader::update ( const char *  srcVert,
const char *  srcGeom,
const char *  srcFrag 
)

Updates the shaders source. Pass NULL for shaders that you don't want to update.


Member Data Documentation

The GLSL shader objects for vertex, geometry and fragment programs.

Definition at line 29 of file SoGLCompleteShader.h.


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