Package com.openinventor.inventor.nodes
Class SoVertexShader
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.SoVertexShader
- All Implemented Interfaces:
SafeDisposable
Node that defines a vertex shader.
This node defines a vertex shader.
See SoShaderProgram
for general information about using shaders and shader parameters.
See parent class SoShaderObject
for details about using the inherited fields.
Notes:
- Shader object nodes cannot be inserted directly in a scene graph.
They must be added to the shaderObject field of anSoShaderProgram
node. - Predefined GLSL variables.
Open Inventor uses a compatibility profile context for rendering. So legacy GLSL predefined variables, for example gl_ModelViewMatrix, can be used in vertex shaders. However, if you use the GLSL "#version" directive in a shader, you should append the keyword "compatibility", for example: "#version 150 compatibility". - Shadows.
To integrate with Open Inventor's shadow casting algorithm, vertex shaders should call the GLSL method OivSetupShadowVertex(). Please seeSoShadowGroup
for example code.
Limitations:
- Transparency and fast editing are compatible with shader modified geometry, but most actions use the vertices of the basic shape (the vertices stored in the scene graph). This includes, for example,
SoGetBoundingBoxAction
,SoGetPrimitiveCountAction
andSoRayPickAction
.
File format/default:
VertexShader {
sourceProgram | "" |
sourceType | FILENAME |
isActive | true |
parameter | NULL |
- See Also:
-
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 -
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
isSupported
(SoShaderObject.SourceTypes sourceType) Calls isSupported(sourceType, (com.openinventor.inventor.misc.SoState)null).static boolean
isSupported
(SoShaderObject.SourceTypes sourceType, SoState state) Indicates if vertex 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
-
Constructor Details
-
SoVertexShader
public SoVertexShader()Constructor.
-
-
Method Details
-
isSupported
Calls isSupported(sourceType, (com.openinventor.inventor.misc.SoState)null). -
isSupported
Indicates if vertex shaders in the specified language are supported by your graphics board. When using a debug build of Open Inventor, some "no context available" warning messages may be generated. You can ignore them or seeSoGLExtension
for an example of usingSoGLContext
to avoid them.
-