Class SoRenderToTextureProperty
- All Implemented Interfaces:
SafeDisposable
It can be used with the classes SoTexture2
and SoTextureCubeMap
. Create the SoRenderToTextureProperty
node and assign it to the
renderToTextureProperty field of the texture mapping node.
The SoRenderToTarget
node can also be used to create texture images.
One of the two fields, node or path, must be defined.
The scene graph should normally contain a camera and at least one light. Unlike SoRenderToTarget
, the children of SoRenderToTextureProperty
do not inherit the camera, lights, etc from the main scene graph.
Note that the default image size is 0,0 (effectively disables rendering).
File format/default:
RenderToTextureProperty {
node | [] |
path | "" |
updatePolicy | WHEN_NEEDED |
backgroundColor | 0 0 0 |
size | 0 0 |
component | RGB |
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
Rendering component enumeration values.static enum
Update Policy enumeration values.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
FieldsModifier and TypeFieldDescriptionfinal SoSFColor
Background color used when rendering the scene graph.Specifies the type of component(s) for the rendering.final SoMFNode
Specifies the scene graph(s) (SoNode(s)
) to be rendered into the texture.final SoMFPath
Specifies the scene graph(s) (SoPath(s)
) to be rendered into the texture.final SoSFVec2s
Size in pixels of the rendered texture.final SoSFTrigger
Trigger field to render the scene into the Pbuffer.Specifies the policy for rendering to the texture.Fields inherited from class com.openinventor.inventor.Inventor
VERBOSE_LEVEL, ZeroHandle
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the render action used for rendering the scene.void
setContextForSharing
(SoGLContext name_20389) Deprecated.As of Open Inventor 10.0.0.0.void
Specifies a custom render action to use for rendering the scene.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 Details
-
node
Specifies the scene graph(s) (SoNode(s)
) to be rendered into the texture. For use withSoTexture2
, only one scene graph should be specified. For use with SoTextureCube map, six scene graphs must be specified, one for each face of the cube in the order:- imagePosX (left)
- imageNegX (right)
- imagePosY (bottom)
- imageNegY (top)
- imagePosZ (back)
- imageNegZ (front)
The node field has priority over the path field. Null by default.
-
path
Specifies the scene graph(s) (SoPath(s)
) to be rendered into the texture. For use withSoTexture2
, only one path should be specified. For use with SoTextureCube map, six paths must be specified, one for each face of the cube in the order:- imagePosX (left)
- imageNegX (right)
- imagePosY (bottom)
- imageNegY (top)
- imagePosZ (back)
- imageNegZ (front)
The node field has priority over the path field. Null by default.
-
updatePolicy
Specifies the policy for rendering to the texture. Use enumUpdatePolicy
. Default is WHEN_NEEDED. -
backgroundColor
Background color used when rendering the scene graph. Black by default. -
size
Size in pixels of the rendered texture. (0, 0) by default. -
component
Specifies the type of component(s) for the rendering. Use enumComponent
. Default is RGB. -
trigger
Trigger field to render the scene into the Pbuffer. Effective only if updatePolicy is ON_TRIGGER.
-
-
Constructor Details
-
SoRenderToTextureProperty
public SoRenderToTextureProperty()
-
-
Method Details
-
setContextForSharing
Deprecated.As of Open Inventor 10.0.0.0. No more used. Related to deprecated PBuffer implementation.Warning Deprecated since Open Inventor 10000. No more used. Related to deprecated PBuffer implementation.
-
getGLRenderAction
Returns the render action used for rendering the scene. -
setGLRenderAction
Specifies a custom render action to use for rendering the scene.
-