SoGLRenderAction Class |
Renders a scene graph using Open Inventor's Render Engine.
Namespace: OIV.Inventor.Actions
The SoGLRenderAction type exposes the following members.
Name | Description | |
---|---|---|
SoGLRenderAction | Constructor. |
Name | Description | |
---|---|---|
AbortNow | ||
Apply(SoNode) | Initiates an action on the graph defined by a node. | |
Apply(SoPath) | Initiates an action on the graph defined by a path. | |
Apply(SoPathList) | Calls Apply(pathList, false). | |
Apply(SoPathList, Boolean) | Initiates an action on the graph defined by a list of paths. | |
ClearApplyResult | When applied, an action may reference nodes or create objects (e.g. | |
EnableDepthPeeling3D | Use 3D texturing instead of 2D for the fixed functionality emulation in depth peeling. | |
EnableElement | ||
EnableElements | (Overrides SoActionEnableElements.) | |
Equals | Determines whether the specified Object is equal to the current Object. (Inherited from Object.) | |
ForwardTraversal(SoNode) | Traverse a node that is not part of the current scenegraph. | |
ForwardTraversal(SoPath) | Traverse a path that is not part of the current scenegraph. | |
GenerateCacheContext | Generates and returns a new cache context id. | |
GetCache | Returns the cache that has been set with OIV.Inventor.Actions.SoGLRenderAction.SetCache(OIV.Inventor.Caches.SoCache) | |
GetCacheContext | Returns the OpenGL cache context id for this action. | |
GetContinueActionInBranchFlag | This function indicates if the action must stop in the current branch. | |
GetCurPass | ||
GetCurPath | Returns the path accumulated during traversal, i.e., the chain of nodes from the root of the traversed graph to the current node being traversed. | |
GetDecimationPercentage | Gets decimation percentage, the value should be a number between 0.0 and 1.0. | |
GetDecimationType | Gets decimation type. | |
GetDelayedObjDepthWrite | Returns whether delayed transparent objects update the depth buffer. | |
GetDepthPeelingPass | Get the current pass of depth peeling, -1 if not doing depth peeling. | |
GetDistribMode | Returns the distribution mode of this action across a cluster (ScaleViz-Cluster only). | |
GetFastEditSavePolicy | Returns fast editing save policy used when rendering. | |
GetFrameCounter | Returns the current frame counter. | |
GetHashCode |
Overrides GetHashCode().
(Inherited from SoNetBase.) | |
GetInvalidateCacheMode | Returns the current cache invalidation mode. | |
GetLogicalViewportRegion | Returns current logical viewport region. | |
GetNodeAppliedTo | Returns the node the action is being applied to. | |
GetNumPasses | Gets number of rendering passes for multipass rendering. | |
GetOriginalPathListAppliedTo | Returns the original path list the action is being applied to. | |
GetPathAppliedTo | Returns the path the action is being applied to. | |
GetPathCode | Returns path code based on where current node (the node at the end of the current path) lies with respect to the path(s) the action is being applied to. | |
GetPathListAppliedTo | Returns the path list the action is being applied to. | |
GetPipeId | Gets pipe identifier in the range [1..N] associated to this render action while running a ScaleViz Multipipe configuration. | |
GetRenderingIsRemote | Returns true if remote rendering is being done. | |
GetSceneManager | Return the OIV.Inventor.SoSceneManager associated with this action. | |
GetSortedLayersNumPasses | Returns the number of rendering passes used when transparency type is OIV.Inventor.Actions.SoGLRenderAction.TransparencyTypes.SORTED_PIXEL. | |
GetState | Gets the state from the action. | |
GetTransparencyType | Returns transparency quality level to use when rendering. | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
GetUpdateArea | Returns the current update area. | |
GetViewportRegion | Returns viewport region to use for rendering. | |
GetWhatAppliedTo | Returns code indicating what action is being applied to. | |
HandleTransparency | Calls HandleTransparency(false, false). | |
HandleTransparency(Boolean) | Calls HandleTransparency(isTransparent, false). | |
HandleTransparency(Boolean, Boolean) | ||
HasTerminated | Returns true if the traversal has reached a termination condition. | |
InvalidateState | Invalidate the state, forcing it to be recreated at the next apply. | |
IsAlphaTest | Returns whether the OpenGL alpha test is enabled for rendering. | |
IsBeingApplied | Returns true if this action is currently being applied. | |
IsDoingDepthPeeling | Return true if depth peeling is active. | |
IsLastPathListAppliedTo | Returns true if the current list is the last one from the original. | |
IsPassUpdate | Returns a flag indicating whether intermediate results are displayed after each antialiasing pass for progressive improvement. | |
IsSmoothing | Obsolete. Returns smoothing flag. | |
IsSortedLayersSupported | Calls IsSortedLayersSupported((OIV.Inventor.Misc.SoState ^)nullptr). | |
IsSortedLayersSupported(SoState) | Indicates if OIV.Inventor.Actions.SoGLRenderAction.TransparencyTypes.SORTED_PIXEL transparency is supported by your graphics board on the current context. | |
IsUsedCacheContext | Returns true if the specified cache context id is currently used by any OIV.Inventor.Actions.SoGLRenderAction. | |
IsUsingAlternateRep | Returns true if current action is using alternate representations. | |
PostDelayedTraversal | Method called by SoMultiPassManager after delayed pass traversals. | |
PreDelayedTraversal | Method called by SoMultiPassManager before delayed pass traversals. | |
ResetContinueActionInBranchFlag | This function resets the continue action flag. | |
ResetFrameCounter | Calls ResetFrameCounter(System.UInt32(0)). | |
ResetFrameCounter(UInt32) | Reset the frame counter. | |
SetAlphaTest | Enable or disable the OpenGL alpha test for rendering. | |
SetCache | Sets the main cache to use with this render action. | |
SetCacheContext | Sets the OpenGL cache context. | |
SetDecimationValue(SoDecimationTypeElementTypes) | Calls SetDecimationValue(type, 1.0). | |
SetDecimationValue(SoDecimationTypeElementTypes, Single) | Sets decimation percentage, the value should be a number between 0.0 and 1.0 Useful for reducing the number of triangles rendered in the scene. | |
SetDelayedObjDepthWrite | Control whether delayed transparent objects update the depth buffer. | |
SetFastEditSavePolicy(SoGLRenderActionFastEditSavePolicies) | Calls SetFastEditSavePolicy(policy, false). | |
SetFastEditSavePolicy(SoGLRenderActionFastEditSavePolicies, Boolean) | Sets fast editing save policy to use when rendering. | |
SetInvalidateCacheMode | Enables or disables the invalidation of render caches. | |
SetLogicalViewportRegion | Sets current logical viewport region to use for rendering. | |
SetNumPasses | Sets number of rendering passes for multipass antialiasing. | |
SetPassUpdate | Sets a flag indicating whether intermediate results are displayed after each antialiasing pass for progressive improvement (default is false). | |
SetPipeId | Sets pipe identifier in the range [1..N] associated to this render action while running a ScaleViz Multipipe configuration. | |
SetRenderingIsRemote | Sets whether or not "remote" rendering is done. | |
SetSceneManager | Set the scene manager associated with this action (if any ). | |
SetSmoothing | Obsolete. Sets smoothing flag. | |
SetSortedLayersNumPasses | Sets the number of rendering passes used when transparency type is OIV.Inventor.Actions.SoGLRenderAction.TransparencyTypes.SORTED_PIXEL. | |
SetTransparencyType | Sets global transparency algorithm to use when rendering. | |
SetUpdateArea | Sets the current update area, which is the rectangular area of the viewport region that will actually be rendered into. | |
SetUpState | initialize the action state. | |
SetViewportRegion | Changes viewport region to use for rendering. | |
ShouldAutoCache | Called by nodes to say that they should/shouldn't be auto-cached (pass true if should, false if shouldn't, don't call this method at all if the node doesn't care): | |
StopActionInBranch | This function stops the action in the current Scene Graph branch. | |
ToString | Returns a string that represents the current object. (Inherited from Object.) | |
Traverse | Does traversal of a graph rooted by a node. | |
UseAlternateRep | Tell the action to use alternate representations during traversal when available. |
Name | Description | |
---|---|---|
AbortCallback | Sets callback to call during rendering to test for an abort condition. | |
PassCallback | Sets a callback function to invoke between passes when antialiasing. |
This class renders a scene graph using Open Inventor's render engine. This action traverses a scene graph and queues commands that allow the render engine to render the scene asynchronously. Note that (despite the "historical" name) this class is not dependent on any graphics library and does not directly provide rendering to a window.
The viewer classes, SoWin/SoXt/SoQtExaminerViewer etc, automatically create a render action for you and also expose most of the rendering options for convenience. See also the viewer component classes (SceneExaminer etc).
Traversal order Nodes from the scene graph are traversed using depth-first traversal. However, traversal of some objects may be delayed, depending on transparency options.
A transparent object is an object:
With a material that has a transparency value set either by a material node or a vertex property node. or
With a texture that has an alpha value < 1.
Open Inventor automatically detects these cases.
The rendering order for transparent objects depends on the transparency "type" (transparency rendering method) assigned to each object. A transparency type may be set for the entire scene graph using the OIV.Inventor.Actions.SoGLRenderAction or OIV.Inventor.Win.SoWinRenderArea method.
There are several special cases including:
Transparency type SORTED_PIXEL. The environment variable OIV_NO_SHADER_LAYERS_BLEND allows you to disable the use of a fragment shader for this technique.
SoRenderList nodes, e.g. SoOctreeOrdering. Objects that are delayed are generally rendered in the sequence below, but other objects are rendered in various specific orders, not in scene graph order. See the specific node for details.
The general rendering order is:
Scene graph traversal All objects not in one of the following categories, specifically including transparent objects using the NO_SORT transparency type.
FastEdit KEEP_ZBUFFER objects Objects under an OIV.Inventor.Nodes.SoSeparator node with fastEditing field set to KEEP_ZBUFFER.
Opaque delayed objects
Transparent delayed objects Objects using transparency types OPAQUE_FIRST or SORTED_PIXEL. Note that by default the OpenGL depth buffer is not updated while rendering these objects.
Transparent sorted objects Objects using transparency types SORTED_OBJECT These objects are sorted by the distance of their bounding box from the camera, then rendered in back-to-front order. Note that by default the OpenGL depth buffer is not updated while rendering these objects.
Annotation delayed objects Objects under an OIV.Inventor.Nodes.SoAnnotation node.
FastEdit CLEAR_ZBUFFER objects Objects under an OIV.Inventor.Nodes.SoSeparator node with fastEditing field set to CLEAR_ZBUFFER.
Elements Sets: OIV.Inventor.Elements.SoDecimationTypeElement, OIV.Inventor.Elements.SoDecimationPercentageElement, OIV.Inventor.Elements.SoUpdateAreaElement, SoRenderPassElement, OIV.Inventor.Elements.SoViewportRegionElement, OIV.Inventor.Elements.SoLogicalViewportElement
Notes & Limitations:
Since OpenInventor 10.0, most rendering and caching mechanisms are managed by OIV.Inventor.SoSceneManager, which means that a OIV.Inventor.Actions.SoGLRenderAction cannot be used outside of the render() call of OIV.Inventor.SoSceneManager. Hence, manually calling OIV.Inventor.Actions.SoGLRenderAction.Apply(OIV.Inventor.Nodes.SoNode) on an OIV.Inventor.Actions.SoGLRenderAction can only be done during the traversal of the scene graph, for example inside an OIV.Inventor.Nodes.SoCallback. Calling OIV.Inventor.Actions.SoGLRenderAction.Apply(OIV.Inventor.Nodes.SoNode) outside of this case leads to undefined behavior and will potentially result in incorrect rendering, performance issues, memory leaks and crashes.