Package com.openinventor.inventor.nodes
Class SoComputeShader
- java.lang.Object
-
- com.openinventor.inventor.Inventor
-
- com.openinventor.inventor.misc.SoBase
-
- com.openinventor.inventor.fields.SoFieldContainer
-
- com.openinventor.inventor.nodes.SoNode
-
- com.openinventor.inventor.nodes.SoShaderObject
-
- com.openinventor.inventor.nodes.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 useSoShaderParameterImage
orSoShaderParameterBufferObject
withSoShaderParameterBufferObject.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:
- Compute shaders cannot coexist with other shader stages in the same shader program. Otherwise, an error will be generated and the shader won't compile (for example, you cannot insert an
SoFragmentShader
along with anSoComputeShader
into the fieldSoShaderProgram.shaderObject
). - An
SoShaderProgram
containing compute shaders cannot be applied onSoShape
nodes. If such a shader program is present on state when a shape is traversed by a rendering action, errors might be raised and the shape will not be rendered. To avoid this case, thoseSoShaderProgram
should be isolated in their ownSoSeparator
, along with theSoComputeShaderScheduler
nodes.
File format/default:
ComputeShader {
sourceProgram "" sourceType FILENAME isActive true parameter NULL - Since:
- Open Inventor 10.12
- See Also:
SoVertexShader
,SoFragmentShader
,SoGeometryShader
,SoShaderObject
,SoShaderProgram
,SoTessellationControlShader
,SoTessellationEvaluationShader
,SoUniformShaderParameter
,SoShaderParameterBufferObject
,SoShaderParameterImage
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.openinventor.inventor.nodes.SoShaderObject
SoShaderObject.ShaderTypes, SoShaderObject.SourceTypes
-
Nested classes/interfaces inherited from class com.openinventor.inventor.nodes.SoNode
SoNode.RenderModes
-
Nested classes/interfaces inherited from class com.openinventor.inventor.Inventor
Inventor.ConstructorCommand
-
-
Field Summary
-
Fields inherited from class com.openinventor.inventor.nodes.SoShaderObject
isActive, parameter, sourceProgram, sourceType
-
Fields inherited from class com.openinventor.inventor.Inventor
VERBOSE_LEVEL, ZeroHandle
-
-
Constructor Summary
Constructors Constructor Description SoComputeShader()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
isSupported(SoShaderObject.SourceTypes sourceType)
Calls isSupported(sourceType, (com.openinventor.inventor.misc.SoState)null).static boolean
isSupported(SoShaderObject.SourceTypes sourceType, SoState state)
Indicates if compute shaders in the specified language are supported by your graphics board.-
Methods inherited from class com.openinventor.inventor.nodes.SoShaderObject
getShaderType
-
Methods inherited from class com.openinventor.inventor.nodes.SoNode
affectsState, callback, copy, copy, distribute, doAction, getAlternateRep, getBoundingBox, getByName, getMatrix, getPrimitiveCount, getRenderEngineMode, getRenderUnitID, GLRender, GLRenderBelowPath, GLRenderInPath, GLRenderOffPath, grabEventsCleanup, grabEventsSetup, handleEvent, isBoundingBoxIgnoring, isOverride, pick, rayPick, search, setOverride, touch, write
-
Methods inherited from class com.openinventor.inventor.fields.SoFieldContainer
copyFieldValues, copyFieldValues, enableNotify, fieldsAreEqual, get, getAllFields, getEventIn, getEventOut, getField, getFieldName, hasDefaultValues, isNotifyEnabled, set, setToDefaults
-
Methods inherited from class com.openinventor.inventor.misc.SoBase
dispose, getName, isDisposable, isSynchronizable, setName, setSynchronizable
-
Methods inherited from class com.openinventor.inventor.Inventor
getNativeResourceHandle
-
-
-
-
Method Detail
-
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 seeSoGLExtension
for an example of usingSoGLContext
to avoid them.
-
-