MeVisLabToolboxReference
|
Shader class which directly takes src for vertex, geometry and/or fragment shader, compiles and links it. More...
#include <SoGLCompleteShader.h>
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 | |
SoGLShaderObject * | m_pVertSh |
The GLSL shader objects for vertex, geometry and fragment programs. | |
SoGLShaderObject * | m_pGeomSh |
SoGLShaderObject * | m_pFragSh |
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.
SoGLCompleteShader::SoGLCompleteShader | ( | ) | [inline] |
Definition at line 34 of file SoGLCompleteShader.h.
SoGLCompleteShader::~SoGLCompleteShader | ( | ) |
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.
Definition at line 29 of file SoGLCompleteShader.h.
Definition at line 29 of file SoGLCompleteShader.h.
The GLSL shader objects for vertex, geometry and fragment programs.
Definition at line 29 of file SoGLCompleteShader.h.