'\"! tbl | mmdoc '\"macro stdmacro .ie n \{\ . ds Cr \fB . ds Cb \fB .\} .el \{\ . ds Cr \f7 . ds Cb \f8 .\} .TH SoGLRenderAction(3IV) .SH NAME SoGLRenderAction \(em renders a scene graph using OpenGL .SH INHERITS FROM SoAction > SoGLRenderAction .SH SYNOPSIS .ps -1 \*(Cr#include .sp .ta 20m .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Crtypedef AbortCode .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbSoGLRenderAbortCB\*(Cr(void *userData) .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Crtypedef void .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbSoGLRenderPassCB\*(Cr(void *userData) .sp .in 0.5i \*(Crenum \*(CbTransparencyType\*(Cr { .in 1i .ta 25m .in 1.5i+25n .ti 1i .ta 25m .ds Pt \*(CbSoGLRenderAction::SCREEN_DOOR\f1 .ie \w'\*(Pt'>=25n \{\ .ne 3 \*(Pt .ti 1i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} Uses stipple patterns for screen-door transparency .br .in 1.5i+25n .ti 1i .ta 25m .ds Pt \*(CbSoGLRenderAction::ADD\f1 .ie \w'\*(Pt'>=25n \{\ .ne 3 \*(Pt .ti 1i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} Uses additive alpha blending .br .in 1.5i+25n .ti 1i .ta 25m .ds Pt \*(CbSoGLRenderAction::DELAYED_ADD\f1 .ie \w'\*(Pt'>=25n \{\ .ne 3 \*(Pt .ti 1i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} Uses additive blending, rendering all transparent objects after opaque ones .br .in 1.5i+25n .ti 1i .ta 25m .ds Pt \*(CbSoGLRenderAction::SORTED_OBJECT_ADD\f1 .ie \w'\*(Pt'>=25n \{\ .ne 3 \*(Pt .ti 1i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} Same as DELAYED_ADD, but sorts transparent objects by distances of bounding boxes from camera .br .in 1.5i+25n .ti 1i .ta 25m .ds Pt \*(CbSoGLRenderAction::BLEND\f1 .ie \w'\*(Pt'>=25n \{\ .ne 3 \*(Pt .ti 1i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} Uses multiplicative alpha blending .br .in 1.5i+25n .ti 1i .ta 25m .ds Pt \*(CbSoGLRenderAction::DELAYED_BLEND\f1 .ie \w'\*(Pt'>=25n \{\ .ne 3 \*(Pt .ti 1i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} Uses multiplicative alpha blending, rendering all transparent objects after opaque ones .br .in 1.5i+25n .ti 1i .ta 25m .ds Pt \*(CbSoGLRenderAction::SORTED_OBJECT_BLEND\f1 .ie \w'\*(Pt'>=25n \{\ .ne 3 \*(Pt .ti 1i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} Same as DELAYED_BLEND, but sorts transparent objects by distances of bounding boxes from camera .br .in 0.5i \*(Cr} .sp .in 0.5i \*(Crenum \*(CbAbortCode\*(Cr { .in 1i .ta 28m .in 1.5i+28n .ti 1i .ta 28m .ds Pt \*(CbSoGLRenderAction::CONTINUE\f1 .ie \w'\*(Pt'>=28n \{\ .ne 3 \*(Pt .ti 1i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} Continue traversal as usual .br .in 1.5i+28n .ti 1i .ta 28m .ds Pt \*(CbSoGLRenderAction::ABORT\f1 .ie \w'\*(Pt'>=28n \{\ .ne 3 \*(Pt .ti 1i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} Stop traversing the rest of the graph .br .in 1.5i+28n .ti 1i .ta 28m .ds Pt \*(CbSoGLRenderAction::PRUNE\f1 .ie \w'\*(Pt'>=28n \{\ .ne 3 \*(Pt .ti 1i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} Do not traverse this node or its children, but continue .br .in 1.5i+28n .ti 1i .ta 28m .ds Pt \*(CbSoGLRenderAction::DELAY\f1 .ie \w'\*(Pt'>=28n \{\ .ne 3 \*(Pt .ti 1i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} Delay rendering of this node until the second pass .br .in 0.5i \*(Cr} .sp .in 1i \f1Methods from class SoGLRenderAction: .in 0.5i .sp .ta 26m .in 1i+26n .ti 0.5i .ta 26m .ds Pt \*(Cr .ie \w'\*(Pt'>=26n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbSoGLRenderAction\*(Cr(const SbViewportRegion &viewportRegion) .br .in 1i+26n .ti 0.5i .ta 26m .ds Pt \*(Crvoid .ie \w'\*(Pt'>=26n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbsetViewportRegion\*(Cr(const SbViewportRegion &newRegion) .br .in 1i+26n .ti 0.5i .ta 26m .ds Pt \*(Crconst SbViewportRegion & .ie \w'\*(Pt'>=26n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbgetViewportRegion\*(Cr() const .br .in 1i+26n .ti 0.5i .ta 26m .ds Pt \*(Crvoid .ie \w'\*(Pt'>=26n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbsetUpdateArea\*(Cr(const SbVec2f &origin, const SbVec2f &size) .br .in 1i+26n .ti 0.5i .ta 26m .ds Pt \*(Crvoid .ie \w'\*(Pt'>=26n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbgetUpdateArea\*(Cr(SbVec2f &origin, SbVec2f &size) const .br .in 1i+26n .ti 0.5i .ta 26m .ds Pt \*(Crvoid .ie \w'\*(Pt'>=26n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbsetAbortCallback\*(Cr(SoGLRenderAbortCB *func, void *userData) .br .in 1i+26n .ti 0.5i .ta 26m .ds Pt \*(Crvoid .ie \w'\*(Pt'>=26n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbsetTransparencyType\*(Cr(TransparencyType type) .br .in 1i+26n .ti 0.5i .ta 26m .ds Pt \*(CrTransparencyType .ie \w'\*(Pt'>=26n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbgetTransparencyType\*(Cr() const .br .in 1i+26n .ti 0.5i .ta 26m .ds Pt \*(Crvoid .ie \w'\*(Pt'>=26n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbsetSmoothing\*(Cr(SbBool smooth) .br .in 1i+26n .ti 0.5i .ta 26m .ds Pt \*(CrSbBool .ie \w'\*(Pt'>=26n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbisSmoothing\*(Cr() const .br .in 1i+26n .ti 0.5i .ta 26m .ds Pt \*(Crvoid .ie \w'\*(Pt'>=26n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbsetNumPasses\*(Cr(int num) .br .in 1i+26n .ti 0.5i .ta 26m .ds Pt \*(Crint .ie \w'\*(Pt'>=26n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbgetNumPasses\*(Cr() const .br .in 1i+26n .ti 0.5i .ta 26m .ds Pt \*(Crvoid .ie \w'\*(Pt'>=26n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbsetPassUpdate\*(Cr(SbBool flag) .br .in 1i+26n .ti 0.5i .ta 26m .ds Pt \*(CrSbBool .ie \w'\*(Pt'>=26n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbisPassUpdate\*(Cr() const .br .in 1i+26n .ti 0.5i .ta 26m .ds Pt \*(Crvoid .ie \w'\*(Pt'>=26n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbsetPassCallback\*(Cr(SoGLRenderPassCB *func, void *userData) .br .in 1i+26n .ti 0.5i .ta 26m .ds Pt \*(Crvoid .ie \w'\*(Pt'>=26n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbsetCacheContext\*(Cr(uint32_t context) .br .in 1i+26n .ti 0.5i .ta 26m .ds Pt \*(Cruint32_t .ie \w'\*(Pt'>=26n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbgetCacheContext\*(Cr() const .sp .in 1i \f1Methods from class SoAction: .in 0.5i .sp .ta 20m .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Crvirtual void .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(Cbapply\*(Cr(SoNode *node) .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Crvirtual void .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(Cbapply\*(Cr(SoPath *path) .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Crvirtual void .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(Cbapply\*(Cr(const SoPathList &pathList, SbBool obeysRules = FALSE) .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Crstatic SoType .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbgetClassTypeId\*(Cr() .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Crvirtual SoType .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbgetTypeId\*(Cr() .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Crvirtual SbBool .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbisOfType\*(Cr(SoType type) .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Crvirtual void .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbinvalidateState\*(Cr() .sp .SH DESCRIPTION This class traverses a scene graph and renders it using the OpenGL graphics library. It assumes that a valid window has been created and initialized for proper OpenGL rendering. The \*(CbSoXtRenderArea\f1 class or any of its \&subclasses may be used to create such a window. .SH METHODS .ta 26m .in 1i+26n .ti 0.5i .ta 26m .ds Pt \*(Cr .ie \w'\*(Pt'>=26n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbSoGLRenderAction\*(Cr(const SbViewportRegion &viewportRegion) .br .in 1i \f1Constructor. The parameter defines the viewport region into which rendering will take place. .sp .in 0.5i .in 1i+26n .ti 0.5i .ta 26m .ds Pt \*(Crvoid .ie \w'\*(Pt'>=26n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbsetViewportRegion\*(Cr(const SbViewportRegion &newRegion) .br .in 1i+26n .ti 0.5i .ta 26m .ds Pt \*(Crconst SbViewportRegion & .ie \w'\*(Pt'>=26n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbgetViewportRegion\*(Cr() const .br .in 1i \f1Changes/returns viewport region to use for rendering. .sp .in 0.5i .in 1i+26n .ti 0.5i .ta 26m .ds Pt \*(Crvoid .ie \w'\*(Pt'>=26n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbsetUpdateArea\*(Cr(const SbVec2f &origin, const SbVec2f &size) .br .in 1i+26n .ti 0.5i .ta 26m .ds Pt \*(Crvoid .ie \w'\*(Pt'>=26n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbgetUpdateArea\*(Cr(SbVec2f &origin, SbVec2f &size) const .br .in 1i \f1Sets/returns the current update area, which is the rectangular area of the viewport region that will actually be rendered into. This can be used for partial updates in applications that can manage them. \&The update area is specified in normalized viewport coordinates, where (0,0) is the lower left corner of the viewport and (1,1) is the upper right corner. The area is specified or returned as an origin \&and a size. .sp .in 0.5i .in 1i+26n .ti 0.5i .ta 26m .ds Pt \*(Crvoid .ie \w'\*(Pt'>=26n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbsetAbortCallback\*(Cr(SoGLRenderAbortCB *func, void *userData) .br .in 1i \f1Sets callback to call during rendering to test for an abort condition. It will be called for each node that is traversed. This allows applications to terminate rendering prematurely if some condition occurs. \&The callback function should return one of the AbortCode codes to indicate whether traversal should continue. Use of the various codes in a callback can allow applications to modify Inventor's default \&order of rendering objects in a scene graph. .sp .in 0.5i .in 1i+26n .ti 0.5i .ta 26m .ds Pt \*(Crvoid .ie \w'\*(Pt'>=26n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbsetTransparencyType\*(Cr(TransparencyType type) .br .in 1i+26n .ti 0.5i .ta 26m .ds Pt \*(CrTransparencyType .ie \w'\*(Pt'>=26n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbgetTransparencyType\*(Cr() const .br .in 1i \f1Sets/returns transparency quality level to use when rendering. The default is SCREEN_DOOR. (Note that SCREEN_DOOR transparency does not work in the case where transparency values are specified for each \&vertex of a shape. If this is the case, use one of the other transparency types.) .sp .in 0.5i .in 1i+26n .ti 0.5i .ta 26m .ds Pt \*(Crvoid .ie \w'\*(Pt'>=26n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbsetSmoothing\*(Cr(SbBool smooth) .br .in 1i+26n .ti 0.5i .ta 26m .ds Pt \*(CrSbBool .ie \w'\*(Pt'>=26n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbisSmoothing\*(Cr() const .br .in 1i \f1Sets/returns smoothing flag. When on, smoothing uses OpenGL's line- and point-smoothing features to provide cheap antialiasing of lines and points. The default is FALSE. .sp .in 0.5i .in 1i+26n .ti 0.5i .ta 26m .ds Pt \*(Crvoid .ie \w'\*(Pt'>=26n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbsetNumPasses\*(Cr(int num) .br .in 1i+26n .ti 0.5i .ta 26m .ds Pt \*(Crint .ie \w'\*(Pt'>=26n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbgetNumPasses\*(Cr() const .br .in 1i \f1Sets/returns number of rendering passes for multipass rendering. Specifying more than one pass will result in antialiasing of the rendered scene, using OpenGL's accumulation buffer. (Camera nodes typically \&move their viewpoints a little bit for each pass to achieve the antialiasing.) Each additional pass provides better antialiasing, but requires more rendering time The default is 1 pass. .sp .in 0.5i .in 1i+26n .ti 0.5i .ta 26m .ds Pt \*(Crvoid .ie \w'\*(Pt'>=26n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbsetPassUpdate\*(Cr(SbBool flag) .br .in 1i+26n .ti 0.5i .ta 26m .ds Pt \*(CrSbBool .ie \w'\*(Pt'>=26n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbisPassUpdate\*(Cr() const .br .in 1i \f1Sets/returns a flag indicating whether intermediate results are displayed after each antialiasing pass for progressive improvement (default is FALSE). .sp .in 0.5i .in 1i+26n .ti 0.5i .ta 26m .ds Pt \*(Crvoid .ie \w'\*(Pt'>=26n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbsetPassCallback\*(Cr(SoGLRenderPassCB *func, void *userData) .br .in 1i \f1Sets a callback function to invoke between passes when antialiasing. Passing NULL (which is the default state) will cause a clear of the color and depth buffers to be performed. .sp .in 0.5i .in 1i+26n .ti 0.5i .ta 26m .ds Pt \*(Crvoid .ie \w'\*(Pt'>=26n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbsetCacheContext\*(Cr(uint32_t context) .br .in 1i+26n .ti 0.5i .ta 26m .ds Pt \*(Cruint32_t .ie \w'\*(Pt'>=26n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbgetCacheContext\*(Cr() const .br .in 1i \f1Sets/returns the OpenGL cache context. A cache context is just an integer identifying when OpenGL display lists (which are used for render caching) can be shared between render actions; for example, see \&the documentation on GLX contexts for information on when OpenGL display lists can be shared between GLX windows. .sp .in 0.5i .SH SEE ALSO \*(CbSoSeparator, SoXtRenderArea