MeVisLab Resolution Independence API
Toggle main menu visibility
Loading...
Searching...
No Matches
SoGLShader.h
Go to the documentation of this file.
1
/*************************************************************************************
2
**
3
** Copyright 2007, MeVis Medical Solutions AG
4
**
5
** The user may use this file in accordance with the license agreement provided with
6
** the Software or, alternatively, in accordance with the terms contained in a
7
** written agreement between the user and MeVis Medical Solutions AG.
8
**
9
** For further information use the contact form at https://www.mevislab.de/contact
10
**
11
**************************************************************************************/
12
13
#ifndef SO_GLSHADER_H
14
#define SO_GLSHADER_H
15
16
18
19
#include "
SoShaderSystem.h
"
20
#include <Inventor/SbBasic.h>
21
#include <
mlOpenGL.h
>
22
24
#define SOSHADER_CORE_GLSL_VERSION 140
25
27
SoEXTENDER
class
INVENTOR_SHADER_API
SoGLShader
28
{
29
public
:
31
static
SbBool
isSupported
();
32
34
static
bool
supportsGeometryShaders
();
35
37
static
void
printCapabilities
();
38
39
protected
:
41
SoGLShader
();
42
44
virtual
~SoGLShader
()
45
{}
46
48
virtual
void
reset
();
49
51
void
errClear
(
const
char
*
string
=
nullptr
)
const
;
53
void
errCheck
(
const
char
*
string
=
nullptr
)
const
;
55
inline
SbBool
error
(
const
char
*
string
=
nullptr
)
const
56
{
57
errCheck
(
string
);
58
return
_openGLError != GL_NO_ERROR;
59
}
60
61
private
:
62
static
int
_isSupported;
63
64
mutable
GLenum _openGLError;
65
};
66
67
#endif
// _SO_GL_SHADER_
SoShaderSystem.h
INVENTOR_SHADER_API
#define INVENTOR_SHADER_API
Define class export specifier.
Definition
SoShaderSystem.h:20
SoGLShader::~SoGLShader
virtual ~SoGLShader()
Destructor.
Definition
SoGLShader.h:44
SoGLShader::errCheck
void errCheck(const char *string=nullptr) const
Check for OpenGL errors and print error message if one is found.
SoGLShader::supportsGeometryShaders
static bool supportsGeometryShaders()
Returns if the hardware supports geometry shaders.
SoGLShader::printCapabilities
static void printCapabilities()
Prints capabilities of the OpenGL implementation.
SoGLShader::error
SbBool error(const char *string=nullptr) const
Returns 'TRUE' if OpenGL error is found.
Definition
SoGLShader.h:55
SoGLShader::reset
virtual void reset()
Free all resources (OpenGL too) and reset instance to initial state.
SoGLShader::errClear
void errClear(const char *string=nullptr) const
Clear OpenGL error state and print any previously not displayed error message.
SoGLShader::SoGLShader
SoGLShader()
Constructor.
SoGLShader::isSupported
static SbBool isSupported()
Returns 'TRUE' if vertex and fragment shaders are supported by OpenGL.
mlOpenGL.h
MeVisLab
Standard
Sources
Inventor
SoShader
Inventor
misc
SoGLShader.h
Generated by
1.18.0