MeVisLab Resolution Independence API
SoGLRenderState.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_GLRENDER_STATE_H
14
#define SO_GLRENDER_STATE_H
15
16
18
19
#include "
SoShaderSystem.h
"
20
#include <Inventor/nodes/SoSubNode.h>
21
#include <Inventor/fields/SoSFBool.h>
22
#include <Inventor/fields/SoSFEnum.h>
23
#include <Inventor/fields/SoSFFloat.h>
24
#include <Inventor/system/SbOpenGL.h>
25
27
class
INVENTOR_SHADER_API
SoGLRenderState
:
public
SoNode
28
{
29
typedef
SoNode inherited;
30
31
SO_NODE_HEADER(
SoGLRenderState
);
32
33
public
:
34
35
enum
AttribSaveMode
{
36
PUSH = 1,
37
POP = 2
38
};
39
40
enum
CullMode
{
41
NONE = 0,
42
FRONT = GL_FRONT,
43
BACK = GL_BACK,
44
FRONT_AND_BACK = GL_FRONT_AND_BACK,
45
};
46
enum
DepthFunction
{
47
NEVER = GL_NEVER,
48
LESS
= GL_LESS,
49
EQUAL
= GL_EQUAL,
50
LESS_EQUAL = GL_LEQUAL,
51
GREATER
= GL_GREATER,
52
NOT_EQUAL = GL_NOTEQUAL,
53
GREATER_EQUAL = GL_GEQUAL,
54
ALWAYS = GL_ALWAYS
55
};
56
enum
PolyMode
{
57
POINTS = GL_POINT,
58
LINES = GL_LINE,
59
FILL = GL_FILL
60
};
61
62
enum
BlendMode
{
63
BLEND_REPLACE
,
64
BLEND_ADD
,
65
BLEND_BLEND
,
66
BLEND_PREMULTIPLIED_BLEND
67
};
68
69
SoSFEnum
attribSaveMode
;
70
SoSFEnum
cullMode
;
71
SoSFBool
depthEnable
;
72
SoSFEnum
depthFunction
;
73
SoSFBool
writeMaskDepth
;
74
SoSFEnum
polyFrontMode
;
75
SoSFEnum
polyBackMode
;
76
SoSFFloat
lineWidth
;
77
SoSFBool
lineSmooth
;
78
SoSFBool
pointSprites
;
79
SoSFBool
blending
;
80
SoSFEnum
blendMode
;
81
83
SoGLRenderState
();
84
85
SoEXTENDER
public
:
86
88
void
GLRender
(SoGLRenderAction *action)
override
;
89
90
SoINTERNAL
public
:
91
93
static
void
initClass
();
94
};
95
96
#endif
// _SO_GL_RENDER_STATE_
GREATER
@ GREATER
Definition
SoKeyGrabber.h:184
EQUAL
@ EQUAL
Definition
SoKeyGrabber.h:183
LESS
@ LESS
Definition
SoKeyGrabber.h:182
SoShaderSystem.h
INVENTOR_SHADER_API
#define INVENTOR_SHADER_API
Define class export specifier.
Definition
SoShaderSystem.h:20
SoGLRenderState
Class SoGLRenderState to manage the GL state in an Open Inventor node.
Definition
SoGLRenderState.h:28
SoGLRenderState::lineSmooth
SoSFBool lineSmooth
Definition
SoGLRenderState.h:77
SoGLRenderState::initClass
static void initClass()
Initialize class with runtime type system.
SoGLRenderState::blending
SoSFBool blending
Definition
SoGLRenderState.h:79
SoGLRenderState::PolyMode
PolyMode
Definition
SoGLRenderState.h:56
SoGLRenderState::BlendMode
BlendMode
Definition
SoGLRenderState.h:62
SoGLRenderState::BLEND_ADD
@ BLEND_ADD
Definition
SoGLRenderState.h:64
SoGLRenderState::BLEND_BLEND
@ BLEND_BLEND
Definition
SoGLRenderState.h:65
SoGLRenderState::BLEND_REPLACE
@ BLEND_REPLACE
Definition
SoGLRenderState.h:63
SoGLRenderState::cullMode
SoSFEnum cullMode
Definition
SoGLRenderState.h:70
SoGLRenderState::CullMode
CullMode
Definition
SoGLRenderState.h:40
SoGLRenderState::SoGLRenderState
SoGLRenderState()
Constructor.
SoGLRenderState::pointSprites
SoSFBool pointSprites
Definition
SoGLRenderState.h:78
SoGLRenderState::DepthFunction
DepthFunction
Definition
SoGLRenderState.h:46
SoGLRenderState::blendMode
SoSFEnum blendMode
Definition
SoGLRenderState.h:80
SoGLRenderState::GLRender
void GLRender(SoGLRenderAction *action) override
Add this node to element in state.
SoGLRenderState::writeMaskDepth
SoSFBool writeMaskDepth
Definition
SoGLRenderState.h:73
SoGLRenderState::lineWidth
SoSFFloat lineWidth
Definition
SoGLRenderState.h:76
SoGLRenderState::depthEnable
SoSFBool depthEnable
Definition
SoGLRenderState.h:71
SoGLRenderState::attribSaveMode
SoSFEnum attribSaveMode
Definition
SoGLRenderState.h:69
SoGLRenderState::polyFrontMode
SoSFEnum polyFrontMode
Definition
SoGLRenderState.h:74
SoGLRenderState::AttribSaveMode
AttribSaveMode
Definition
SoGLRenderState.h:35
SoGLRenderState::depthFunction
SoSFEnum depthFunction
Definition
SoGLRenderState.h:72
SoGLRenderState::polyBackMode
SoSFEnum polyBackMode
Definition
SoGLRenderState.h:75
MeVisLab
Standard
Sources
Inventor
SoShader
Inventor
nodes
SoGLRenderState.h
Generated by
1.10.0