|
MeVisLab Resolution Independence API
|
Vertex or fragment shader object class. More...
#include <SoGLShaderObject.h>
Public Member Functions | |
| SoGLShaderObject (SoShader::ShaderType shaderType) | |
| Constructor. | |
| ~SoGLShaderObject () override | |
| Destructor. | |
| void | reset () override |
| Free all resources (OpenGL too) and reset instance to initial state. | |
| void | activate (SbBool act) |
| SbBool | isActive () const |
| SoShader::ShaderType | shaderType () const |
| void | setSource (const SbString &source) |
| const SbString & | getSource () const |
| void | attach (SoGLShaderProgram *shaderProgram) |
| void | detach () |
| int | version () const |
| Get the used GLSL version (only available after compile()!). | |
| SbBool | isCreated () const |
| void | compile () |
| void | scheduleCompile () |
| SbBool | shouldCompile () const |
| void | scheduleRebuild () |
| SoGLShaderProgram * | getShaderProgram () const |
| void | setName (const SbString &name) |
| const SbString & | getName () const |
| void | setAlwaysReadErrorLog (bool flag) |
| bool | alwaysReadErrorLog () |
| bool | hadCompileError () |
| const SbString & | getErrorLog () |
| void | setEmulateLegacyOpenGL (bool flag) |
Protected Member Functions | |
| std::string | adaptSourceString () |
| 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 Attributes | |
| bool | _emulateLegacyOpenGL |
| SoShader::ShaderType | _shaderType |
| SbBool | _isActive |
| int | _version |
| SbString | _source |
| SbBool | _shouldCompile |
| SbString | _name |
| SoGLShaderProgram * | _shaderProgram |
| ml::GLSLShader | _shaderRes |
| bool | _alwaysReadErrorLog |
| bool | _hadError |
| SbString | _errorLog |
Additional Inherited Members | |
| 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. | |
Vertex or fragment shader object class.
Definition at line 28 of file SoGLShaderObject.h.
| SoGLShaderObject::SoGLShaderObject | ( | SoShader::ShaderType | shaderType | ) |
Constructor.
References shaderType().
|
override |
Destructor.
| void SoGLShaderObject::activate | ( | SbBool | act | ) |
|
protected |
|
inline |
Definition at line 112 of file SoGLShaderObject.h.
References _alwaysReadErrorLog.
| void SoGLShaderObject::attach | ( | SoGLShaderProgram * | shaderProgram | ) |
| void SoGLShaderObject::compile | ( | ) |
| void SoGLShaderObject::detach | ( | ) |
|
inline |
Definition at line 121 of file SoGLShaderObject.h.
References _errorLog.
|
inline |
Definition at line 103 of file SoGLShaderObject.h.
References _name.
|
inline |
Definition at line 93 of file SoGLShaderObject.h.
References _shaderProgram.
|
inline |
Definition at line 54 of file SoGLShaderObject.h.
References _source.
|
inline |
Definition at line 117 of file SoGLShaderObject.h.
References _hadError.
|
inline |
Definition at line 43 of file SoGLShaderObject.h.
References _isActive.
|
inline |
Definition at line 68 of file SoGLShaderObject.h.
References _shaderRes.
|
overridevirtual |
Free all resources (OpenGL too) and reset instance to initial state.
Reimplemented from SoGLShader.
|
inline |
Definition at line 78 of file SoGLShaderObject.h.
References _shouldCompile.
|
inline |
Definition at line 87 of file SoGLShaderObject.h.
References _shaderProgram, and _shouldCompile.
|
inline |
Definition at line 108 of file SoGLShaderObject.h.
References _alwaysReadErrorLog.
| void SoGLShaderObject::setEmulateLegacyOpenGL | ( | bool | flag | ) |
|
inline |
Definition at line 98 of file SoGLShaderObject.h.
References _name.
| void SoGLShaderObject::setSource | ( | const SbString & | source | ) |
|
inline |
Definition at line 48 of file SoGLShaderObject.h.
References _shaderType.
Referenced by SoGLShaderObject().
|
inline |
Definition at line 82 of file SoGLShaderObject.h.
References _shouldCompile.
|
inline |
Get the used GLSL version (only available after compile()!).
Definition at line 63 of file SoGLShaderObject.h.
References _version.
|
protected |
Definition at line 147 of file SoGLShaderObject.h.
Referenced by alwaysReadErrorLog(), and setAlwaysReadErrorLog().
|
protected |
Definition at line 131 of file SoGLShaderObject.h.
|
protected |
Definition at line 149 of file SoGLShaderObject.h.
Referenced by getErrorLog().
|
protected |
Definition at line 148 of file SoGLShaderObject.h.
Referenced by hadCompileError().
|
protected |
Definition at line 134 of file SoGLShaderObject.h.
Referenced by isActive().
|
protected |
Definition at line 141 of file SoGLShaderObject.h.
|
protected |
Definition at line 143 of file SoGLShaderObject.h.
Referenced by getShaderProgram(), and scheduleRebuild().
|
protected |
Definition at line 145 of file SoGLShaderObject.h.
Referenced by isCreated().
|
protected |
Definition at line 133 of file SoGLShaderObject.h.
Referenced by shaderType().
|
protected |
Definition at line 139 of file SoGLShaderObject.h.
Referenced by scheduleCompile(), scheduleRebuild(), and shouldCompile().
|
protected |
Definition at line 138 of file SoGLShaderObject.h.
Referenced by getSource().
|
protected |
Definition at line 136 of file SoGLShaderObject.h.
Referenced by version().