SoGLRenderActionSetTransparencyType Method |
Sets global transparency algorithm to use when rendering.
Namespace: OIV.Inventor.Actions
. The default is NO_SORT, but SORTED_PIXEL is recommended for most cases. See also OIV.Inventor.Actions.SoGLRenderAction.GetTransparencyType(). Transparency handling can be completely disabled by setting NO_SORT.
The global transparency algorithm can also be set using a method in the viewer class (e.g. OIV.Inventor.Win.SoWinRenderArea.SetTransparencyType(OIV.Inventor.Actions.SoGLRenderAction.TransparencyTypes)).
The default value for this field can be set using the environment variable OIV_TRANSPARENCY_TYPE.
See OIV.Inventor.Actions.SoGLRenderAction.TransparencyTypes for more discussion about transparency.
Notes:
When using transparency types with DELAYED in the name, the depth buffer is not updated (depth buffer writes are disabled) while rendering transparent objects. As a result complex 3D shapes may not be rendered correctly.
When using a delayed transparency mode, paths to transparent objects are saved in a list. After all opaque objects have been rendered, this list is rendered. In order to avoid unnecessary rendering, the common part of each path is rendered only once. This can increase performance on very complex scene graphs. However, in some cases, it can lead to incorrect rendering. In the figure below, node B is a transparent object and node A has a side effect on node B (clipping, shader...). When the compact path optimization is on (the default), node A will not be traversed during the transparency pass, which will lead to incorrect rendering. When a case like this occurs in your scene graph, set the environment variable OIV_USE_COMPACT_PATHS to false to disable this optimization.