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
28{
29 typedef SoNode inherited;
30
31 SO_NODE_HEADER(SoGLRenderState);
32
33 public:
34
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 };
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 {
66 BLEND_PREMULTIPLIED_BLEND
67 };
68
70 SoSFEnum cullMode;
71 SoSFBool depthEnable;
72 SoSFEnum depthFunction;
74 SoSFEnum polyFrontMode;
75 SoSFEnum polyBackMode;
76 SoSFFloat lineWidth;
77 SoSFBool lineSmooth;
78 SoSFBool pointSprites;
79 SoSFBool blending;
80 SoSFEnum blendMode;
81
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
@ EQUAL
@ LESS
#define INVENTOR_SHADER_API
Define class export specifier.
Class SoGLRenderState to manage the GL state in an Open Inventor node.
static void initClass()
Initialize class with runtime type system.
SoGLRenderState()
Constructor.
void GLRender(SoGLRenderAction *action) override
Add this node to element in state.
SoSFBool writeMaskDepth
SoSFEnum attribSaveMode