MeVisLab Resolution Independence API
Toggle main menu visibility
Loading...
Searching...
No Matches
SoGLCompleteShader.h
Go to the documentation of this file.
1
/*************************************************************************************
2
**
3
** Copyright 2009, 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_GLCOMPLETE_SHADER_H
14
#define SO_GLCOMPLETE_SHADER_H
15
16
18
19
#include "
SoShaderSystem.h
"
20
#include <Inventor/SbBasic.h>
21
#include <
mlOpenGL.h
>
22
23
#include "
SoGLShaderProgram.h
"
24
25
class
SoGLShaderObject
;
26
class
SoGLTexture;
27
29
SoEXTENDER
class
INVENTOR_SHADER_API
SoGLCompleteShader
:
public
SoGLShaderProgram
30
{
31
public
:
33
SoGLShaderObject
*
m_pVertSh
, *
m_pGeomSh
, *
m_pFragSh
;
34
35
public
:
36
SoGLCompleteShader
()
37
:
m_pVertSh
(nullptr)
38
,
m_pGeomSh
(nullptr)
39
,
m_pFragSh
(nullptr)
40
{}
41
~SoGLCompleteShader
()
override
;
42
44
bool
create
(
const
char
* srcVert,
const
char
* srcGeom,
const
char
* srcFrag);
46
bool
update
(
const
char
* srcVert,
const
char
* srcGeom,
const
char
* srcFrag);
47
49
void
bindTexture
(
const
char
* name, SoGLTexture* texture,
int
unit = -1);
50
52
void
enable
();
53
};
54
55
#endif
// _SO_GLCOMPLETE_SHADER_
SoGLShaderProgram.h
SoShaderSystem.h
INVENTOR_SHADER_API
#define INVENTOR_SHADER_API
Define class export specifier.
Definition
SoShaderSystem.h:20
SoGLCompleteShader::m_pVertSh
SoGLShaderObject * m_pVertSh
The GLSL shader objects for vertex, geometry and fragment programs.
Definition
SoGLCompleteShader.h:33
SoGLCompleteShader::create
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.
SoGLCompleteShader::bindTexture
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
SoGLCompleteShader::m_pGeomSh
SoGLShaderObject * m_pGeomSh
Definition
SoGLCompleteShader.h:33
SoGLCompleteShader::~SoGLCompleteShader
~SoGLCompleteShader() override
SoGLCompleteShader::m_pFragSh
SoGLShaderObject * m_pFragSh
Definition
SoGLCompleteShader.h:33
SoGLCompleteShader::update
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.
SoGLCompleteShader::enable
void enable()
enables the shader, resets the assigned texture units
SoGLCompleteShader::SoGLCompleteShader
SoGLCompleteShader()
Definition
SoGLCompleteShader.h:36
SoGLShaderObject
Vertex or fragment shader object class.
Definition
SoGLShaderObject.h:29
SoGLShaderProgram::SoGLShaderProgram
SoGLShaderProgram()
Constructor.
mlOpenGL.h
MeVisLab
Standard
Sources
Inventor
SoShader
Inventor
misc
SoGLCompleteShader.h
Generated by
1.18.0