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
SoComputeShadermay useSoShaderParameterImageorSoShaderParameterBufferObjectwithSoShaderParameterBufferObject.SHADER_STORAGE_BUFFERbuffer type.To fetch data, an
SoComputeShadermay use the above-mentioned parameter types, or regular texture access.See
SoShaderProgramfor general information about using shaders and shader parameters.See parent class
SoShaderObjectfor details about using the inherited fields.See
SoComputeShaderSchedulerfor 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:
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 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
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 seeSoGLExtensionfor an example of usingSoGLContextto avoid them.
-
-