MeVisLab Toolbox Reference
|
Shader class which directly takes src for vertex, geometry and/or fragment shader, compiles and links it. More...
#include <SoGLCompleteShader.h>
Public Attributes | |
SoGLShaderObject * | m_pVertSh |
The GLSL shader objects for vertex, geometry and fragment programs. | |
SoGLShaderObject * | m_pGeomSh |
SoGLShaderObject * | m_pFragSh |
Additional Inherited Members | |
Public Types inherited from SoGLShaderProgram | |
enum | LinkageResult { LR_FAILURE = 0 , LR_SUCCESS = 1 , LR_SKIPPED = 2 } |
Public Types inherited from SoUniformParameterBase | |
enum | SamplerType { SAMPLER_1D , SAMPLER_2D , SAMPLER_3D , SAMPLER_CUBEMAP } |
Static Public Member Functions inherited from SoGLShader | |
static SbBool | isSupported () |
Returns 'TRUE' if vertex and fragment shaders are supported by OpenGL. | |
static bool | supportsGeometryShaders () |
Returns if the hardware supports geometry shaders. | |
static void | printCapabilities () |
Prints capabilities of the OpenGL implementation. | |
Protected Member Functions inherited from SoGLShaderProgram | |
GLint | getUniform (const SbString &name, GLenum type, int *num=nullptr) |
Protected Member Functions inherited from SoGLShader | |
SoGLShader () | |
Constructor. | |
virtual | ~SoGLShader () |
Destructor. | |
void | errClear (const char *string=nullptr) const |
Clear OpenGL error state and print any previously not displayed error message. | |
void | errCheck (const char *string=nullptr) const |
Check for OpenGL errors and print error message if one is found. | |
SbBool | error (const char *string=nullptr) const |
Returns 'TRUE' if OpenGL error is found. | |
Protected Member Functions inherited from SoUniformParameterBase | |
SoUniformParameterBase () | |
Hidden constructor. | |
virtual | ~SoUniformParameterBase () |
Hidden destructor. | |
Protected Attributes inherited from SoGLShaderProgram | |
ml::GLSLProgram | _programRes |
GLint | _geometryInputType |
GLint | _geometryOutputType |
GLint | _geometryVerticesOut |
std::list< SoGLShaderObject * > | _shaderObjects |
SbBool | _shouldLink |
SbBool | _isExecutable |
SbString | _name |
int | _assignedTextureUnits |
std::map< std::string, UniformInfo > | _uniformInfo |
bool | _alwaysReadErrorLog |
bool | _hadError |
SbString | _errorLog |
Shader class which directly takes src for vertex, geometry and/or fragment shader, compiles and links it.
Definition at line 29 of file SoGLCompleteShader.h.
|
inline |
Definition at line 38 of file SoGLCompleteShader.h.
|
override |
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, resets the assigned texture units
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.
SoGLShaderObject * SoGLCompleteShader::m_pFragSh |
Definition at line 35 of file SoGLCompleteShader.h.
SoGLShaderObject * SoGLCompleteShader::m_pGeomSh |
Definition at line 34 of file SoGLCompleteShader.h.
SoGLShaderObject* SoGLCompleteShader::m_pVertSh |
The GLSL shader objects for vertex, geometry and fragment programs.
Definition at line 33 of file SoGLCompleteShader.h.