13#ifndef SO_GLSHADER_OBJECT_H
14#define SO_GLSHADER_OBJECT_H
22#include <Inventor/SbLinear.h>
64 return _shaderRes.isValid();
72 _shouldCompile = TRUE;
75 return _shouldCompile;
79 _shaderProgram =
nullptr;
80 _shouldCompile = TRUE;
84 return _shaderProgram;
87 void setName(
const SbString& name) { _name = name; }
89 const SbString&
getName()
const {
return _name; }
#define INVENTOR_SHADER_API
Define class export specifier.
Vertex or fragment shader object class.
const SbString & getName() const
void setSource(const SbString &source)
bool _emulateLegacyOpenGL
int version() const
Get the used GLSL version (only available after compile()!)
void setName(const SbString &name)
void reset() override
Free all resources (OpenGL too) and reset instance to initial state.
SoGLShaderProgram * getShaderProgram() const
void attach(SoGLShaderProgram *shaderProgram)
void setEmulateLegacyOpenGL(bool flag)
SoShader::ShaderType shaderType() const
SoShader::ShaderType _shaderType
const SbString & getSource() const
void activate(SbBool act)
SoGLShaderProgram * _shaderProgram
void setAlwaysReadErrorLog(bool flag)
SoGLShaderObject(SoShader::ShaderType shaderType)
Constructor.
std::string adaptSourceString()
ml::GLSLShader _shaderRes
const SbString & getErrorLog()
SbBool shouldCompile() const
~SoGLShaderObject() override
Destructor.
bool alwaysReadErrorLog()
Class managing an OpenGL shader program.
Abstract base class for shader objects.