Enum SoGLRenderAction.TransparencyTypes
- java.lang.Object
-
- java.lang.Enum<SoGLRenderAction.TransparencyTypes>
-
- com.openinventor.inventor.actions.SoGLRenderAction.TransparencyTypes
-
- All Implemented Interfaces:
IntegerValuedEnum
,java.io.Serializable
,java.lang.Comparable<SoGLRenderAction.TransparencyTypes>
- Enclosing class:
- SoGLRenderAction
public static enum SoGLRenderAction.TransparencyTypes extends java.lang.Enum<SoGLRenderAction.TransparencyTypes> implements IntegerValuedEnum
Transparency rendering algorithm. SeesetTransparencyType()
method.Note: The transparency values deprecated since OpenInventor 9 have been removed. You can find below a correspondence table:
OIV 10 OIV 9 NO_SORT NO_SORT
NO_TRANSPARENCY
SCREEN_DOOR
ADD
BLENDOPAQUE_FIRST OPAQUE_FIRST
DELAYED_ADD
DELAYED_BLENDSORTED_OBJECT SORTED_OBJECT
SORTED_OBJECT_ADD
SORTED_OBJECT_BLENDSORTED_PIXEL SORTED_PIXEL
SORTED_LAYERS_BLEND
SORTED_PIXELS_BLEND
DELAYED_SORTED_LAYERS_BLEND
DELAYED_SORTED_PIXELS_BLEND
SORTED_TRIANGLES_ADD
SORTED_TRIANGLES_BLEND
SORTED_OBJECT_TRIANGLES_ADD
SORTED_OBJECT_TRIANGLES_BLEND
-
-
Enum Constant Summary
Enum Constants Enum Constant Description NO_SORT
Uses simple alpha blending.NO_TRANSPARENCY
Deprecated.As of Open Inventor 10000.OPAQUE_FIRST
Same as NO_SORT, but the rendering of opaque objects is performed before the rendering of transparent objects.SORTED_OBJECT
Same as OPAQUE_FIRST, but sorts transparent objects by distances of bounding boxes from camera.SORTED_PIXEL
Uses a fragment-level depth sorting technique.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getValue()
Returns the integer value of the enum constant.static SoGLRenderAction.TransparencyTypes
valueOf(int val)
Returns the enum constant of this type with the specified integer valuestatic SoGLRenderAction.TransparencyTypes
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static SoGLRenderAction.TransparencyTypes[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
NO_TRANSPARENCY
public static final SoGLRenderAction.TransparencyTypes NO_TRANSPARENCY
Deprecated.As of Open Inventor 10000. No longer supported. Will automatically switch to NO_SORT.Warning Deprecated since Open Inventor 10000. No longer supported. Will automatically switch to NO_SORT.
-
NO_SORT
public static final SoGLRenderAction.TransparencyTypes NO_SORT
Uses simple alpha blending.
Note that depth buffer is activated during rendering.
-
OPAQUE_FIRST
public static final SoGLRenderAction.TransparencyTypes OPAQUE_FIRST
Same as NO_SORT, but the rendering of opaque objects is performed before the rendering of transparent objects.
Note: When using this algorithm, the depth buffer is not updated (depth buffer writes are disabled) during the rendering of transparent objects. As a result, complex transparent shapes may not be rendered correctly.
-
SORTED_OBJECT
public static final SoGLRenderAction.TransparencyTypes SORTED_OBJECT
Same as OPAQUE_FIRST, but sorts transparent objects by distances of bounding boxes from camera. Limitation : If the bounding box of a shape is ignored by setting its boundingBoxIgnoring field to true, the rendering won't be correct.
-
SORTED_PIXEL
public static final SoGLRenderAction.TransparencyTypes SORTED_PIXEL
Uses a fragment-level depth sorting technique. This mode generally gives the best results for complex transparent objects.Since Open Inventor 9.4, if the hardware supports the necessary OpenGL features, this transparency mode is implemented using a single-pass, order-independent fragment sorting (K-buffer or A-buffer) algorithm. The required OpenGL hardware features are: shader_image_load_store, shader_atomic_counters and shading_language_420pack. These features are standard in core OpenGL 4.2. Use
SoGLExtension
, if necessary, to check if they are supported.If the hardware does not support single-pass transparency, then a multi-pass "depth peeling" algorithm is used. The required OpenGL hardware features are: Multi-Texture, Texture Environment Combine, Depth texture, and Shadow . These features are standard starting with OpenGL 1.4. The method
setSortedLayersNumPasses()
allows you to set the number of rendering passes for more correct transparency. Usually, four passes gives good results.If the graphics board does not support multi-pass transparency, SORTED_OBJECT is used.
Note: If the application uses fragment sorting transparency and specifies a custom fragment shader, the application shader must call an Open Inventor GLSL method instead of setting gl_FragColor directly. In the SDK installation, see shaders/include/Inventor/oivDepthPeeling_frag.h
Limitations:
- This transparency type is not compatible with interlaced stereo.
- Texturing on transparent objects is limited to one texture.
- Using the single-pass algorithm, it is possible to run out of GPU memory for storing fragment transparency values. This should only happen for scenes with both high depth complexity and a large number of transparent objects. In this case fragments from the objects traversed last in the scene graph may not be sorted correctly, resulting in small artifacts.
- Not compatible with FSAA. use SUPERSAMPLING, FXAA or SMAA instead.
-
-
Method Detail
-
values
public static SoGLRenderAction.TransparencyTypes[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (SoGLRenderAction.TransparencyTypes c : SoGLRenderAction.TransparencyTypes.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static SoGLRenderAction.TransparencyTypes valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
valueOf
public static SoGLRenderAction.TransparencyTypes valueOf(int val)
Returns the enum constant of this type with the specified integer value- Returns:
- the enum constant of this type with the specified integer value.
-
getValue
public int getValue()
Description copied from interface:IntegerValuedEnum
Returns the integer value of the enum constant.- Specified by:
getValue
in interfaceIntegerValuedEnum
- Returns:
- the integer value of the enum constant.
-
-