Class SoComputeShader

All Implemented Interfaces:
SafeDisposable

public class SoComputeShader extends SoShaderObject
Node that defines a compute shader. This node defines a compute shader, a shader stage used entirely for computing arbitrary information.

To store the result of the computation, an SoComputeShader may use SoShaderParameterImage or SoShaderParameterBufferObject with SoShaderParameterBufferObject.SHADER_STORAGE_BUFFER buffer type.

To fetch data, an SoComputeShader may use the above-mentioned parameter types, or regular texture access.

See SoShaderProgram for general information about using shaders and shader parameters.

See parent class SoShaderObject for details about using the inherited fields.

See SoComputeShaderScheduler for information about compute shader invocation.

Notes & Limitations:

File format/default:

ComputeShader {

    sourceProgram ""
    sourceType FILENAME
    isActive true
    parameter NULL
}

Since:
Open Inventor 10.12

See Also:
  • Constructor Details

    • SoComputeShader

      public SoComputeShader()
  • Method Details

    • isSupported

      public static boolean isSupported(SoShaderObject.SourceTypes sourceType)
      Calls isSupported(sourceType, (com.openinventor.inventor.misc.SoState)null).
    • isSupported

      public static boolean isSupported(SoShaderObject.SourceTypes sourceType, SoState state)
      Indicates if compute shaders in the specified language are supported by your graphics board. When using a debug build of Open Inventor, warning messages such as "no context available" may be generated. You can ignore them or see SoGLExtension for an example of using SoGLContext to avoid them.