1#ifndef COIN_SORENDERMANAGER_H
2#define COIN_SORENDERMANAGER_H
27#include <Inventor/SbColor4f.h>
28#include <Inventor/SbVec2s.h>
29#include <Inventor/actions/SoGLRenderAction.h>
40class SoRenderManagerP;
42typedef void SoRenderManagerRenderCB(
void * userdata,
class SoRenderManager * mgr);
47 class COIN_DLL_API Superimposition {
51 CLEARZBUFFER = 0x0002,
56 Superimposition(
SoNode * scene,
63 void setEnabled(SbBool yes);
64 int getStateFlags(
void)
const;
68 static void changeCB(
void * data,
SoSensor * sensor);
69 class SuperimpositionP * pimpl;
85 QUAD_BUFFER = SEPARATE_OUTPUT,
104 virtual void render(
const SbBool clearwindow = TRUE,
105 const SbBool clearzbuffer = TRUE);
108 const SbBool initmatrices = TRUE,
109 const SbBool clearwindow = TRUE,
110 const SbBool clearzbuffer = TRUE);
112 Superimposition * addSuperimposition(
SoNode * scene,
114 Superimposition::AUTOREDRAW |
115 Superimposition::ZBUFFERON |
116 Superimposition::CLEARZBUFFER);
118 void removeSuperimposition(Superimposition * s);
120 virtual void setSceneGraph(
SoNode *
const sceneroot);
121 virtual SoNode * getSceneGraph(
void)
const;
126 void setAutoClipping(AutoClippingStrategy autoclipping);
127 void attachRootSensor(
SoNode *
const sceneroot);
128 void attachClipSensor(
SoNode *
const sceneroot);
129 void detachRootSensor(
void);
130 void detachClipSensor(
void);
132 AutoClippingStrategy getAutoClipping(
void)
const;
133 void setNearPlaneValue(
float value);
134 float getNearPlaneValue(
void)
const;
135 void setTexturesEnabled(
const SbBool onoff);
136 SbBool isTexturesEnabled(
void)
const;
137 void setDoubleBuffer(
const SbBool enable);
138 SbBool isDoubleBuffer(
void)
const;
139 void setRenderMode(
const RenderMode mode);
140 RenderMode getRenderMode(
void)
const;
141 void setStereoMode(
const StereoMode mode);
142 StereoMode getStereoMode(
void)
const;
143 void setStereoOffset(
const float offset);
144 float getStereoOffset(
void)
const;
146 void setRenderCallback(SoRenderManagerRenderCB * f,
147 void *
const userData = NULL);
149 SbBool isAutoRedraw(
void)
const;
150 void setRedrawPriority(
const uint32_t priority);
151 uint32_t getRedrawPriority(
void)
const;
153 static void nodesensorCB(
void * data,
SoSensor *);
156 void reinitialize(
void);
157 void scheduleRedraw(
void);
158 void setWindowSize(
const SbVec2s & newsize);
159 const SbVec2s & getWindowSize(
void)
const;
160 void setSize(
const SbVec2s & newsize);
161 const SbVec2s & getSize(
void)
const;
162 void setOrigin(
const SbVec2s & newOrigin);
163 const SbVec2s & getOrigin(
void)
const;
166 void setBackgroundColor(
const SbColor4f & color);
167 const SbColor4f & getBackgroundColor(
void)
const;
168 void setBackgroundIndex(
const int index);
169 int getBackgroundIndex(
void)
const;
170 void setRGBMode(
const SbBool onOrOff);
171 SbBool isRGBMode(
void)
const;
172 virtual void activate(
void);
173 virtual void deactivate(
void);
175 void setAntialiasing(
const SbBool smoothing,
const int numPasses);
176 void getAntialiasing(SbBool & smoothing,
int & numPasses)
const;
182 static void enableRealTimeUpdate(
const SbBool flag);
183 static SbBool isRealTimeUpdateEnabled(
void);
184 static uint32_t getDefaultRedrawPriority(
void);
186 void addPreRenderCallback(SoRenderManagerRenderCB * cb,
void * data);
187 void removePreRenderCallback(SoRenderManagerRenderCB * cb,
void * data);
189 void addPostRenderCallback(SoRenderManagerRenderCB * cb,
void * data);
190 void removePostRenderCallback(SoRenderManagerRenderCB * cb,
void * data);
193 int isActive(
void)
const;
201 const SbBool initmatrices = TRUE,
202 const SbBool clearwindow = TRUE,
203 const SbBool clearzbuffer = TRUE);
208 SbBool clearzbuffer);
213 SbBool clearzbuffer);
215 void initStencilBufferForInterleavedStereo(
void);
216 void clearBuffers(SbBool color, SbBool depth);
219 SoRenderManagerP * pimpl;
220 friend class SoRenderManagerP;
222 friend class Superimposition;
The SbColor4f class contains the red, green, blue and alpha components which make up a color value.
Definition SbColor4f.h:33
The SbVec2s class is a 2 dimensional vector with short integer coordinates.
Definition SbVec2s.h:41
The SbViewportRegion class is a viewport within a full window.
Definition SbViewportRegion.h:31
The SoAudioRenderAction class renders the aural parts of the scene graph.
Definition SoAudioRenderAction.h:33
The SoCamera class is the abstract base class for camera definition nodes.
Definition SoCamera.h:54
The SoEvent class is the base class for all Coin events.
Definition SoEvent.h:34
The SoGLRenderAction class renders the scene graph with OpenGL calls.
Definition SoGLRenderAction.h:41
TransparencyType
Definition SoGLRenderAction.h:52
The SoNodeSensor class detects changes to nodes.
Definition SoNodeSensor.h:29
The SoNode class is the base class for nodes used in scene graphs.
Definition SoNode.h:47
The SoOneShotSensor class is a sensor which will trigger once.
Definition SoOneShotSensor.h:29
Definition SoRenderManager.h:44
StereoMode
Definition SoRenderManager.h:81
@ SEPARATE_OUTPUT
Definition SoRenderManager.h:84
@ INTERLEAVED_ROWS
Definition SoRenderManager.h:86
@ ANAGLYPH
Definition SoRenderManager.h:83
@ MONO
Definition SoRenderManager.h:82
RenderMode
Definition SoRenderManager.h:72
@ WIREFRAME
Definition SoRenderManager.h:74
@ HIDDEN_LINE
Definition SoRenderManager.h:77
@ AS_IS
Definition SoRenderManager.h:73
@ WIREFRAME_OVERLAY
Definition SoRenderManager.h:76
@ POINTS
Definition SoRenderManager.h:75
AutoClippingStrategy
Definition SoRenderManager.h:95
@ FIXED_NEAR_PLANE
Definition SoRenderManager.h:97
@ NO_AUTO_CLIPPING
Definition SoRenderManager.h:96
BufferType
Definition SoRenderManager.h:90
@ BUFFER_SINGLE
Definition SoRenderManager.h:91
The SoSceneManager class provides the main interface between the scene graph and the GUI toolkit.
Definition SoSceneManager.h:44
The SoSensor class is the abstract base class for all sensors.
Definition SoSensor.h:34