55#ifndef _SO_GL_RENDER_ACTION_
56#define _SO_GL_RENDER_ACTION_
150 { abortCB = funcArg; abortData = userData; }
188 { passCB = funcArg; passData = userData; }
206 {
return (
hasTerminated() || (abortCB != NULL && checkAbort())); }
232 {
return renderingDelPaths; }
255 SoGLRenderAbortCB *abortCB;
268 bool renderingTranspObjs;
281 bool renderingDelPaths;
282 bool allowDelayedPaths;
288 TRANSPARENCY_TYPE = 0x01,
295 void renderAllPasses(
SoNode *node);
298 void renderPass(
SoNode *node,
int pass);
302 void renderTransparentObjs();
305 void enableBlending(
bool enable);
#define SoEXTENDER
Provide inline template functions for abs, swap, min, max, and clamp.
#define INVENTOR_API
Disable some annoying warnings on MSVC 6.
void SoGLRenderPassCB(void *userData)
Callback functions used between rendering passes should be of this type.
#define SO_ACTION_HEADER(className)
Macros to be called within the class definition header for an action subclass:
Class for representing a viewport.
Abstract base class for all actions.
bool hasTerminated() const
Returns TRUE if the traversal has reached a termination condition.
Renders a scene graph using OpenGL.
void addDelayedPath(SoPath *path)
Adds to the list of paths to render after all other stuff (including delayed/sorted transparent objec...
AbortCode
Possible return codes from a render abort callback.
@ ABORT
Stop traversing the rest of the graph.
@ PRUNE
Do not traverse this node or its children.
@ CONTINUE
Continue as usual.
void setAbortCallback(SoGLRenderAbortCB *funcArg, void *userData)
Sets callback to call during rendering to test for an abort condition.
void setCullTestResults(int b)
bool handleTransparency(bool isTransparent=FALSE)
Returns TRUE if render action handles processing of a transparent object (if it is to be sorted and r...
virtual void invalidateState()
Invalidate the state, forcing it to be recreated at the next apply.
TransparencyType getTransparencyType() const
Sets/returns transparency quality level to use when rendering.
bool isRenderingDelayedPaths() const
Returns TRUE if currently rendering delayed paths.
virtual void beginTraversal(SoNode *node)
Initiates action on graph.
bool setAllowDelayedPath(bool flag)
Sets if delayed paths are allowed while rendering.
bool abortNow()
Returns TRUE if render action should abort - checks user callback.
void setTransparencyType(TransparencyType type)
virtual ~SoGLRenderAction()
Destructor.
bool isPassUpdate() const
Sets/returns a flag indicating whether intermediate results are displayed after each antialiasing pas...
AbortCode SoGLRenderAbortCB(void *userData)
Callback functions for render abort should be of this type.
bool isDelaying() const
Returns TRUE if rendering is being delayed because of transparency sorting or delaying.
void setPassUpdate(bool flag)
void setCacheContext(uint32_t context)
SoGLRenderAction(const SbViewportRegion &viewportRegion)
Constructor.
const SbViewportRegion & getViewportRegion() const
Returns viewport region to use for rendering.
TransparencyType
Various levels of transparency rendering quality.
@ ADD
Use additive GL alpha blending.
@ SCREEN_DOOR
Use GL patterns for screen-door transparency.
@ BLEND
Use GL alpha blending.
@ DELAYED_ADD
Use additive blending, do transp objs last.
@ SORTED_OBJECT_ADD
Use additive blending, sort objects by bbox.
@ DELAYED_BLEND
Use GL alpha blending, do transp objs last.
uint32_t getCacheContext() const
Sets/returns the OpenGL cache context.
bool getAllowDelayedPaths()
Returns if delayed paths are currently allowed.
void setSmoothing(bool smooth)
int getCurPass() const
Returns current rendering pass number.
void getUpdateArea(SbVec2f &origin, SbVec2f &size) const
Sets/returns the current update area, which is the rectangular area of the viewport region that will ...
bool isSmoothing() const
Sets/returns smoothing flag.
void setViewportRegion(const SbViewportRegion &newRegion)
Changes viewport region to use for rendering.
int getNumPasses() const
Sets/returns number of rendering passes for multipass rendering.
void setNumPasses(int num)
void setPassCallback(SoGLRenderPassCB *funcArg, void *userData)
Sets a callback function to invoke between passes when antialiasing.
void setUpdateArea(const SbVec2f &origin, const SbVec2f &size)
Computes bounding box of a scene.
Abstract base class for all database nodes.
Maintains a list of pointers to paths.
Path that points to a list of hierarchical nodes.