Class SoShaderParameter
- 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.SoShaderParameter
-
- All Implemented Interfaces:
SafeDisposable
- Direct Known Subclasses:
SoShaderParameterBufferObject
,SoShaderParameterImage
,SoUniformShaderParameter
,SoVertexShaderParameter
public class SoShaderParameter extends SoNode
Abstract base class for all shader parameter nodes. This is the abstract class from which all the shader parameter nodes are derived. There are two families of shader parameter nodes:- Uniform parameters
Uniform parameters are used to pass data values to shader programs. A uniform parameter is effectively a constant for all executions of a shader during one render traversal. There is a specific class for each uniform parameter data type, e.g. useSoShaderParameter1i
for a single integer parameter. See the base classSoUniformShaderParameter
for examples of setting a parameter. - Vertex parameters
Vertex parameters are used to pass per-vertex data values to shader programs. A vertex parameter is effectively an array of values, one per vertex. There is a specific class for each vertex parameter data type, e.g. useSoVertexShaderParameter1f
to specific a single float value for each vertex. See the base classSoVertexShaderParameter
for examples of setting a parameter.
Each parameter is defined by one or both of the following properties:
- name,
- identifier,
There are two ways to specify the name of a parameter: using the field
name
to specify a string, or using the fieldidentifier
to specify an integer. This is because assembly languages (e.g., ARB_vertex_program/ARB_fragment_program) have index naming conventions rather than string naming conventions, whereas with Cg/GLSL, it is exactly the opposite. The two fields (name
andidentifier
) allow specification of uniform parameters for both types of language. Depending on the language (ARB_, Cg, or GLSL), only one of the two fields will be used.Specific subclasses add fields to hold a specific type of value.
File format/default:
This is an abstract class. See the reference page of a derived class for the format and default values.
Action behavior:
Sets:
SoUniformShaderParameterElement
,SoVertexShaderParameterElement
- See Also:
SoUniformShaderParameter
,SoShaderParameter1f
,SoShaderParameter1i
,SoShaderParameter2f
,SoShaderParameter2i
,SoShaderParameter3f
,SoShaderParameter3i
,SoShaderParameter4f
,SoShaderParameter4i
,SoShaderParameterArray1f
,SoShaderParameterArray1i
,SoShaderParameterArray2f
,SoShaderParameterArray2i
,SoShaderParameterArray3f
,SoShaderParameterArray3i
,SoShaderParameterArray4f
,SoShaderParameterArray4i
,SoShaderParameterMatrix
,SoShaderParameterMatrixArray
,SoShaderStateMatrixParameter
,SoVertexShaderParameter
,SoVertexShaderParameter1f
,SoVertexShaderParameter1s
,SoVertexShaderParameter2f
,SoVertexShaderParameter2s
,SoVertexShaderParameter3f
,SoVertexShaderParameter3s
,SoVertexShaderParameter4f
,SoVertexShaderParameter4i
,SoVertexShaderParameter4s
,SoVertexShaderParameter4b
,SoVertexShaderParameter4ui
,SoVertexShaderParameter4us
,SoVertexShaderParameter4ub
,SoVertexShaderParameterMatrix
,SoShaderObject
,SoShaderProgram
-
-
Nested Class Summary
-
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 Modifier and Type Field Description SoSFInt32
identifier
Specifies the parameter's integer name which is declared and used within low-level shading programs.SoSFString
name
Specifies the parameter's string name which is declared and used within high-level shading programs.-
Fields inherited from class com.openinventor.inventor.Inventor
VERBOSE_LEVEL, ZeroHandle
-
-
Method Summary
-
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
-
-
-
-
Field Detail
-
name
public final SoSFString name
Specifies the parameter's string name which is declared and used within high-level shading programs.
-
identifier
public final SoSFInt32 identifier
Specifies the parameter's integer name which is declared and used within low-level shading programs.
-
-