Package com.openinventor.inventor.nodes
Class SoGeometryShader
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.SoGeometryShader
- All Implemented Interfaces:
SafeDisposable
Node that defines a geometry shader.
This node defines a geometry 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. - Since Open Inventor 10.0, when writing geometry shaders, the input and output primitive types must be specified in the shader code. See https://developer.openinventor.com/index.php/general-documentation/how-to-write-shaders-with-oiv-10/#geomshader for more information.
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
. - The input primitive type must match the primitive type used with the rendering command that renders with this shader program. Valid inputs are points, lines and triangles so shapes like
SoCube
,SoIndexedFaceSet
defines with quads or polygons,SoQuadMesh
are not compatible withSoGeometryShader
.
File format/default:
GeometryShader {
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 geometry 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
-
SoGeometryShader
public SoGeometryShader()Constructor.
-
-
Method Details
-
isSupported
Calls isSupported(sourceType, (com.openinventor.inventor.misc.SoState)null). -
isSupported
Indicates if geometry 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.
-