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
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:
- 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
SoFragmentShaderalong with anSoComputeShaderinto the fieldSoShaderProgram.shaderObject). - An
SoShaderProgramcontaining compute shaders cannot be applied onSoShapenodes. 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, thoseSoShaderProgramshould be isolated in their ownSoSeparator, along with theSoComputeShaderSchedulernodes.
File format/default:
ComputeShader {
| sourceProgram | "" |
| sourceType | FILENAME |
| isActive | true |
| parameter | NULL |
- Since:
- Open Inventor 10.12
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class com.openinventor.inventor.nodes.SoShaderObject
SoShaderObject.ShaderTypes, SoShaderObject.SourceTypesNested classes/interfaces inherited from class com.openinventor.inventor.nodes.SoNode
SoNode.RenderModesNested 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, sourceTypeFields inherited from class com.openinventor.inventor.Inventor
VERBOSE_LEVEL, ZeroHandle -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanisSupported(SoShaderObject.SourceTypes sourceType) Calls isSupported(sourceType, (com.openinventor.inventor.misc.SoState)null).static booleanisSupported(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
getShaderTypeMethods 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, writeMethods inherited from class com.openinventor.inventor.fields.SoFieldContainer
copyFieldValues, copyFieldValues, enableNotify, fieldsAreEqual, get, getAllFields, getEventIn, getEventOut, getField, getFieldName, hasDefaultValues, isNotifyEnabled, set, setToDefaultsMethods inherited from class com.openinventor.inventor.misc.SoBase
dispose, getName, isDisposable, isSynchronizable, setName, setSynchronizableMethods inherited from class com.openinventor.inventor.Inventor
getNativeResourceHandle
-
Constructor Details
-
SoComputeShader
public SoComputeShader()
-
-
Method Details
-
isSupported
Calls isSupported(sourceType, (com.openinventor.inventor.misc.SoState)null). -
isSupported
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 seeSoGLExtensionfor an example of usingSoGLContextto avoid them.
-