Click or drag to resize
SoGLRenderAction Class

Renders a scene graph using OpenGL.

Inheritance Hierarchy

Namespace: OIV.Inventor.Actions
Assembly: OIV.Inventor (in OIV.Inventor.dll) Version: 9.9.13.0 (9.9.13.0)
Syntax
public class SoGLRenderAction : SoAction

The SoGLRenderAction type exposes the following members.

Constructors
  NameDescription
Public methodSoGLRenderAction

Constructor.

Top
Methods
  NameDescription
Public methodAbortNow
Public methodApply(SoNode)

Initiates an action on the graph defined by a node.

(Inherited from SoAction.)
Public methodApply(SoPath)

Initiates an action on the graph defined by a path.

(Inherited from SoAction.)
Public methodApply(SoPathList)
Calls Apply(pathList, false).
(Inherited from SoAction.)
Public methodApply(SoPathList, Boolean)

Initiates an action on the graph defined by a list of paths.

(Inherited from SoAction.)
Public methodClearApplyResult

When applied, an action may reference nodes or create objects (e.g.

(Inherited from SoAction.)
Public methodEnableDepthPeeling3D

Use 3D texturing instead of 2D for the fixed functionality emulation in depth peeling.

Public methodStatic memberEnableElement
Public methodEnableElements

(Overrides SoActionEnableElements.)
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Public methodForwardTraversal

Traverse a node that is not part of the current scenegraph.

(Inherited from SoAction.)
Public methodStatic memberGenerateCacheContext

Generates and returns a new cache context id.

Public methodGetCacheContext

Returns the OpenGL cache context id for this action.

Public methodGetContinueActionInBranchFlag

This function indicates if the action must stop in the current branch.

(Inherited from SoAction.)
Public methodGetCurPass
Public methodGetCurPath
(Inherited from SoAction.)
Public methodGetDecimationPercentage

Gets decimation percentage, the value should be a number between 0.0 and 1.0.

Public methodGetDecimationType

Gets decimation type.

Public methodGetDelayedObjDepthWrite

Returns whether delayed transparent objects update the depth buffer.

Public methodGetDepthPeelingPass

Get the current pass of depth peeling, -1 if not doing depth peeling.

Public methodGetFastEditSavePolicy

Returns fast editing save policy used when rendering.

Public methodGetFrameCounter

Returns the current frame counter.

Public methodGetHashCode
Overrides GetHashCode().
(Inherited from SoNetBase.)
Public methodGetInvalidateCacheMode

Returns the current cache invalidation mode.

Public methodGetLogicalViewportRegion

Returns current logical viewport region.

Public methodGetNodeAppliedTo
(Inherited from SoAction.)
Public methodGetNumPasses

Gets number of rendering passes for multipass rendering.

Public methodGetOriginalPathListAppliedTo
(Inherited from SoAction.)
Public methodGetPathAppliedTo
(Inherited from SoAction.)
Public methodGetPathCode(SbNativeArrayInt32)

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.

(Inherited from SoAction.)
Public methodGetPathCode(SbNativeInt32Array) Obsolete.

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.

(Inherited from SoAction.)
Public methodGetPathListAppliedTo
(Inherited from SoAction.)
Public methodGetPipeId

Gets pipe identifier in the range [1..N] associated to this render action while running a ScaleViz Multipipe configuration.

(Inherited from SoAction.)
Public methodGetRenderingIsRemote

Returns true if remote rendering is being done.

Public methodGetSceneManager

Return the SoSceneManager associated with this action.

(Inherited from SoAction.)
Public methodGetSortedLayersNumPasses

Returns the number of rendering passes used when transparency type is SORTED_PIXELS_BLEND.

Public methodGetSortedTrianglesNumCaches

Returns the maximum number of caches allowed for the sorted triangles transparency types.

Public methodGetSortedTrianglesSortFrequency

Returns the sort frequency used for the SORTED_TRIANGLES_XXX and SORTED_OBJECT_TRIANGLES_XXX transparency types.

Public methodGetState
(Inherited from SoAction.)
Public methodGetTransparencyType

Returns transparency quality level to use when rendering.

Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodGetUpdateArea

Returns the current update area.

Public methodGetViewportRegion

Returns viewport region to use for rendering.

Public methodGetWhatAppliedTo
(Inherited from SoAction.)
Public methodHandleTransparency
Calls HandleTransparency(false, false).
Public methodHandleTransparency(Boolean)
Calls HandleTransparency(isTransparent, false).
Public methodHandleTransparency(Boolean, Boolean)
Public methodHasTerminated
(Inherited from SoAction.)
Public methodInvalidateState

Invalidate the state, forcing it to be recreated at the next apply.

(Overrides SoActionInvalidateState.)
Public methodIsAlphaTest

Returns whether the OpenGL alpha test is enabled for rendering.

Public methodIsBeingApplied

Returns true if this action is currently being applied.

(Inherited from SoAction.)
Public methodIsDoingDepthPeeling

Return true if depth peeling is active.

Public methodIsLastPathListAppliedTo
(Inherited from SoAction.)
Public methodIsPassUpdate

Returns a flag indicating whether intermediate results are displayed after each antialiasing pass for progressive improvement.

Public methodIsSmoothing

Returns smoothing flag.

Public methodStatic memberIsSortedLayersSupported
Calls IsSortedLayersSupported((OIV.Inventor.Misc.SoState ^)nullptr).
Public methodStatic memberIsSortedLayersSupported(SoState)

Indicates if SORTED_PIXELS_BLEND transparency is supported by your graphics board on the current context.

Public methodStatic memberIsUsedCacheContext

Returns true if the specified cache context id is currently used by any SoGLRenderAction.

Public methodIsUsingAlternateRep

Returns true if current action is using alternate representations.

(Inherited from SoAction.)
Public methodPostDelayedTraversal

Method called by SoMultiPassManager after delayed pass traversals.

(Overrides SoActionPostDelayedTraversal.)
Public methodPreDelayedTraversal

Method called by SoMultiPassManager before delayed pass traversals.

(Overrides SoActionPreDelayedTraversal.)
Public methodResetContinueActionInBranchFlag

This function resets the continue action flag.

(Inherited from SoAction.)
Public methodResetFrameCounter
Calls ResetFrameCounter(System.UInt32(0)).
Public methodResetFrameCounter(UInt32)

Reset the frame counter.

Public methodSetAbortCallback(SoGLRenderActionAbortCB) Obsolete.
Use AbortCallback property instead. Sets delegate 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 delegate methodh should return one of the AbortCode codes to indicate whether traversal should continue. Use of the various codes in a delegate can allow applications to modify Open Inventor's default order of rendering objects in a scene graph.
Public methodSetAbortCallback(SoGLRenderActionAbortUserDataCB, Object) Obsolete.
Use AbortCallback property instead.
Public methodSetAlphaTest

Enable or disable the OpenGL alpha test for rendering.

Public methodSetCacheContext

Sets the OpenGL cache context.

Public methodSetDecimationValue(SoDecimationTypeElementTypes)
Calls SetDecimationValue(type, 1.0).
Public methodSetDecimationValue(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.

Public methodSetDelayedObjDepthWrite

Control whether delayed transparent objects update the depth buffer.

Public methodSetFastEditSavePolicy(SoGLRenderActionFastEditSavePolicies)
Calls SetFastEditSavePolicy(policy, false).
Public methodSetFastEditSavePolicy(SoGLRenderActionFastEditSavePolicies, Boolean)

Sets fast editing save policy to use when rendering.

Public methodSetInvalidateCacheMode

Enables or disables the invalidation of render caches.

Public methodSetLogicalViewportRegion

Sets current logical viewport region to use for rendering.

Public methodSetNumPasses

Sets number of rendering passes for multipass antialiasing.

Public methodSetPassCallback(SoGLRenderActionPassCB) Obsolete.
Use PassCallback property instead. Sets a delegate method 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.
Public methodSetPassCallback(SoGLRenderActionPassUserDataCB, Object) Obsolete.
Use PassCallback property instead.
Public methodSetPassUpdate

Sets a flag indicating whether intermediate results are displayed after each antialiasing pass for progressive improvement (default is false).

Public methodSetPipeId

Sets pipe identifier in the range [1..N] associated to this render action while running a ScaleViz Multipipe configuration.

(Inherited from SoAction.)
Public methodSetRenderingIsRemote

Sets whether or not "remote" rendering is done.

Public methodSetSceneManager

Set the scene manager associated with this action (if any ).

(Inherited from SoAction.)
Public methodSetSmoothing

Sets smoothing flag.

Public methodSetSortedLayersNumPasses

Sets the number of rendering passes used when transparency type is SORTED_PIXELS_BLEND or DELAYED_SORTED_PIXELS_BLEND.

Public methodSetSortedTrianglesNumCaches

Sets the number of caches to use when the transparency type is SORTED_TRIANGLES_XXX or SORTED_OBJECT_TRIANGLES_XXX.

Public methodSetSortedTrianglesSortFrequency

This method specifies the angle between each sorting axis when using the transparency type SORTED_TRIANGLES_XXX or SORTED_OBJECT_TRIANGLES_XXX.

Public methodSetTransparencyType

Sets global transparency algorithm to use when rendering.

Public methodSetUpdateArea

Sets the current update area, which is the rectangular area of the viewport region that will actually be rendered into.

Public methodSetUpState

initialize the action state.

(Overrides SoActionSetUpState.)
Public methodSetViewportRegion

Changes viewport region to use for rendering.

Public methodShouldAutoCache

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):

Public methodStopActionInBranch

This function stops the action in the current Scene Graph branch.

(Inherited from SoAction.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodTraverse
(Inherited from SoAction.)
Public methodUseAlternateRep

Tell the action to use alternate representations during traversal when available.

(Inherited from SoAction.)
Top
Properties
  NameDescription
Public propertyAbortCallback

Sets callback to call during rendering to test for an abort condition.

Public propertyPassCallback

Sets a callback function to invoke between passes when antialiasing.

Top
Remarks

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 SoWinRenderArea class or any of its subclasses may be used to create such a window.

This class has many options for rendering, but the most commonly used methods are exposed by the viewer classes (SoWin, SoXt, SoQt) for convenience. The viewer classes automatically create a render action for you.

Traversal order In most cases objects are rendered during the SoGLRenderAction traversal of the scene graph, in the order they are encountered during the traversal. However rendering of some objects may be delayed until after the scene graph traversal, particularly transparent objects.

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 SoGLRenderAction or SoWinRenderArea method. The transparency type may also be modified during traversal using the SoTransparencyType node.

There are several special cases including:

  • Transparency type SORTED_PIXELS_BLEND. 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 SCREEN_DOOR, ADD, or BLEND transparency types.

FastEdit KEEP_ZBUFFER objects Objects under an SoSeparator node with fastEditing field set to KEEP_ZBUFFER.

Opaque delayed objects

Transparent delayed objects Objects using transparency types DELAYED_BLEND or DELAYED_ADD. Note that by default the OpenGL depth buffer is not updated while rendering these objects.

Transparent sorted objects Objects using transparency types SORTED_OBJECT_BLEND or SORTED_OBJECT_ADD. 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.

Transparent sorted triangles by object Objects using transparency types SORTED_OBJECT_TRIANGLES_ADD or SORTED_OBJECT_TRIANGLES_BLEND. First, objects are sorted according to their projected position on the current sorting axis. Then the triangles are sorted within each object and rendered object by object.

Transparent sorted triangles Objects using transparency types SORTED_TRIANGLES_ADD or SORTED_TRIANGLES_BLEND. All of the triangles for all of the objects in the scene are sorted according to their projected position on the current sorting axis. The triangles are rendered in order, triangle by triangle, regardless of the object they belong to.

Annotation delayed objects Objects under an SoAnnotation node.

FastEdit CLEAR_ZBUFFER objects Objects under an SoSeparator node with fastEditing field set to CLEAR_ZBUFFER.

Front buffer objects Objects under an SoFrontBufferGroup (after the buffer swap).

Elements Sets: SoDecimationTypeElement, SoDecimationPercentageElement, SoUpdateAreaElement, SoRenderPassElement, SoViewportRegionElement, SoLogicalViewportElement

See Also