public class SoRenderToTextureProperty extends SoNode
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:
Modifier and Type | Class and Description |
---|---|
static class |
SoRenderToTextureProperty.Components
Rendering component enumeration values.
|
static class |
SoRenderToTextureProperty.UpdatePolicies
Update Policy enumeration values.
|
Inventor.ConstructorCommand
Modifier and Type | Field and Description |
---|---|
SoSFColor |
backgroundColor
Background color used when rendering the scene graph.
|
SoSFEnum<SoRenderToTextureProperty.Components> |
component
Specifies the type of component(s) for the rendering.
|
static int |
DEPTH
Deprecated.
Use
SoRenderToTextureProperty.Components.DEPTH instead. |
static int |
EACH_FRAME
Deprecated.
Use
SoRenderToTextureProperty.UpdatePolicies.EACH_FRAME instead. |
SoMFNode |
node
Specifies the scene graph(s) (
SoNode(s) ) to be rendered into the texture. |
static int |
ON_TRIGGER
Deprecated.
Use
SoRenderToTextureProperty.UpdatePolicies.ON_TRIGGER instead. |
SoMFPath |
path
Specifies the scene graph(s) (
SoPath(s) ) to be rendered into the texture. |
static int |
RGB
Deprecated.
Use
SoRenderToTextureProperty.Components.RGB instead. |
static int |
RGB_ALPHA
Deprecated.
Use
SoRenderToTextureProperty.Components.RGB_ALPHA instead. |
static int |
RGB_TRANSPARENCY
Deprecated.
|
SoSFVec2s |
size
Size in pixels of the rendered texture.
|
SoSFTrigger |
trigger
Trigger field to render the scene into the Pbuffer.
|
SoSFEnum<SoRenderToTextureProperty.UpdatePolicies> |
updatePolicy
Specifies the policy for rendering to the texture.
|
static int |
WHEN_NEEDED
Deprecated.
Use
SoRenderToTextureProperty.UpdatePolicies.WHEN_NEEDED instead. |
VERBOSE_LEVEL, ZeroHandle
Constructor and Description |
---|
SoRenderToTextureProperty() |
Modifier and Type | Method and Description |
---|---|
SoGLRenderAction |
getGLRenderAction()
Returns the render action used for rendering the scene.
|
void |
setContextForSharing(SoGLContext context)
Set OpenGL render context for display list sharing.
|
void |
setGLRenderAction(SoGLRenderAction ra)
Specifies a custom render action to use for rendering the scene.
|
affectsState, callback, copy, copy, distribute, doAction, getAlternateRep, getBoundingBox, getByName, getMatrix, getPrimitiveCount, getRenderUnitID, GLRender, GLRenderBelowPath, GLRenderInPath, GLRenderOffPath, grabEventsCleanup, grabEventsSetup, handleEvent, isBoundingBoxIgnoring, isOverride, pick, rayPick, search, setOverride, touch, write
copyFieldValues, copyFieldValues, enableNotify, fieldsAreEqual, get, getAllFields, getEventIn, getEventOut, getField, getFieldName, hasDefaultValues, isNotifyEnabled, set, setToDefaults
dispose, getEXTERNPROTO, getName, getPROTO, isDisposable, isSynchronizable, setName, setSynchronizable
getAddress, getNativeResourceHandle, startInternalThreads, stopInternalThreads
@Deprecated public static final int EACH_FRAME
SoRenderToTextureProperty.UpdatePolicies.EACH_FRAME
instead.@Deprecated public static final int WHEN_NEEDED
SoRenderToTextureProperty.UpdatePolicies.WHEN_NEEDED
instead.@Deprecated public static final int ON_TRIGGER
SoRenderToTextureProperty.UpdatePolicies.ON_TRIGGER
instead.@Deprecated public static final int RGB
SoRenderToTextureProperty.Components.RGB
instead.@Deprecated public static final int RGB_TRANSPARENCY
SoRenderToTextureProperty.Components.RGB_TRANSPARENCY
instead.@Deprecated public static final int RGB_ALPHA
SoRenderToTextureProperty.Components.RGB_ALPHA
instead.@Deprecated public static final int DEPTH
SoRenderToTextureProperty.Components.DEPTH
instead.public final SoMFNode node
SoNode(s)
) to be rendered into the texture.
For use with SoTexture2
, 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:
The node field has priority over the path field. Null by default.
public final SoMFPath path
SoPath(s)
) to be rendered into the texture.
For use with SoTexture2
, 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:
The node field has priority over the path field. Null by default.
public final SoSFEnum<SoRenderToTextureProperty.UpdatePolicies> updatePolicy
UpdatePolicy
. Default is WHEN_NEEDED.public final SoSFColor backgroundColor
public final SoSFVec2s size
public final SoSFEnum<SoRenderToTextureProperty.Components> component
Component
. Default is RGB.public final SoSFTrigger trigger
public void setContextForSharing(SoGLContext context)
public void setGLRenderAction(SoGLRenderAction ra)
public SoGLRenderAction getGLRenderAction()
Generated on January 23, 2025, Copyright © Thermo Fisher Scientific. All rights reserved. http://www.openinventor.com