MeVisLab Toolbox Reference
Loading...
Searching...
No Matches
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
enum
AttribSaveMode
{
35
PUSH = 1,
36
POP = 2
37
};
38
39
enum
CullMode
{
40
NONE = 0,
41
FRONT =
GL_FRONT
,
42
BACK =
GL_BACK
,
43
FRONT_AND_BACK =
GL_FRONT_AND_BACK
,
44
};
45
enum
DepthFunction
{
46
NEVER =
GL_NEVER
,
47
LESS
=
GL_LESS
,
48
EQUAL
=
GL_EQUAL
,
49
LESS_EQUAL =
GL_LEQUAL
,
50
GREATER
=
GL_GREATER
,
51
NOT_EQUAL =
GL_NOTEQUAL
,
52
GREATER_EQUAL =
GL_GEQUAL
,
53
ALWAYS =
GL_ALWAYS
54
};
55
enum
PolyMode
{
56
POINTS =
GL_POINT
,
57
LINES =
GL_LINE
,
58
FILL =
GL_FILL
59
};
60
61
enum
BlendMode
{
62
BLEND_REPLACE
,
63
BLEND_ADD
,
64
BLEND_BLEND
,
65
BLEND_PREMULTIPLIED_BLEND
66
};
67
68
SoSFEnum
attribSaveMode
;
69
SoSFEnum
cullMode
;
70
SoSFBool
depthEnable
;
71
SoSFEnum
depthFunction
;
72
SoSFBool
writeMaskDepth
;
73
SoSFEnum
polyFrontMode
;
74
SoSFEnum
polyBackMode
;
75
SoSFFloat
lineWidth
;
76
SoSFBool
lineSmooth
;
77
SoSFBool
pointSprites
;
78
SoSFBool
blending
;
79
SoSFEnum
blendMode
;
80
82
SoGLRenderState
();
83
84
SoEXTENDER
public
:
85
87
void
GLRender
(
SoGLRenderAction
*
action
)
override
;
88
89
SoINTERNAL
public
:
90
92
static
void
initClass
();
93
};
94
95
#endif
// _SO_GL_RENDER_STATE_
GREATER
@ GREATER
Definition
SoKeyGrabber.h:184
EQUAL
@ EQUAL
Definition
SoKeyGrabber.h:183
LESS
@ LESS
Definition
SoKeyGrabber.h:182
BLEND_PREMULTIPLIED_BLEND
@ BLEND_PREMULTIPLIED_BLEND
Definition
SoView2DDefinitions.h:64
SoGLRenderState
Class SoGLRenderState to manage the GL state in an Open Inventor node.
Definition
SoGLRenderState.h:28
SoGLRenderState::lineSmooth
SoSFBool lineSmooth
Definition
SoGLRenderState.h:76
SoGLRenderState::initClass
static void initClass()
Initialize class with runtime type system.
SoGLRenderState::blending
SoSFBool blending
Definition
SoGLRenderState.h:78
SoGLRenderState::PolyMode
PolyMode
Definition
SoGLRenderState.h:55
SoGLRenderState::BlendMode
BlendMode
Definition
SoGLRenderState.h:61
SoGLRenderState::BLEND_ADD
@ BLEND_ADD
Definition
SoGLRenderState.h:63
SoGLRenderState::BLEND_BLEND
@ BLEND_BLEND
Definition
SoGLRenderState.h:64
SoGLRenderState::BLEND_REPLACE
@ BLEND_REPLACE
Definition
SoGLRenderState.h:62
SoGLRenderState::cullMode
SoSFEnum cullMode
Definition
SoGLRenderState.h:69
SoGLRenderState::CullMode
CullMode
Definition
SoGLRenderState.h:39
SoGLRenderState::SoGLRenderState
SoGLRenderState()
Constructor.
SoGLRenderState::pointSprites
SoSFBool pointSprites
Definition
SoGLRenderState.h:77
SoGLRenderState::DepthFunction
DepthFunction
Definition
SoGLRenderState.h:45
SoGLRenderState::blendMode
SoSFEnum blendMode
Definition
SoGLRenderState.h:79
SoGLRenderState::GLRender
void GLRender(SoGLRenderAction *action) override
Add this node to element in state.
SoGLRenderState::writeMaskDepth
SoSFBool writeMaskDepth
Definition
SoGLRenderState.h:72
SoGLRenderState::lineWidth
SoSFFloat lineWidth
Definition
SoGLRenderState.h:75
SoGLRenderState::depthEnable
SoSFBool depthEnable
Definition
SoGLRenderState.h:70
SoGLRenderState::attribSaveMode
SoSFEnum attribSaveMode
Definition
SoGLRenderState.h:68
SoGLRenderState::polyFrontMode
SoSFEnum polyFrontMode
Definition
SoGLRenderState.h:73
SoGLRenderState::AttribSaveMode
AttribSaveMode
Definition
SoGLRenderState.h:34
SoGLRenderState::depthFunction
SoSFEnum depthFunction
Definition
SoGLRenderState.h:71
SoGLRenderState::polyBackMode
SoSFEnum polyBackMode
Definition
SoGLRenderState.h:74
mlrange_cast
Target mlrange_cast(Source arg)
Generic version of checked ML casts.
Definition
mlRangeCasts.h:305
MeVisLab
Standard
Sources
Inventor
SoShader
Inventor
nodes
SoGLRenderState.h
Generated by
1.10.0