SoRenderToTextureProperty Class Reference
[General]

VSG extension Class for creating a texture by rendering a scene graph More...

#include <Inventor/nodes/SoRenderToTextureProperty.h>

Inheritance diagram for SoRenderToTextureProperty:
SoNode SoFieldContainer SoBase SoRefCounter SoTypedObject

List of all members.

Public Types

enum  UpdatePolicy {
  EACH_FRAME,
  WHEN_NEEDED,
  ON_TRIGGER
}
enum  Component {
  RGB,
  RGB_TRANSPARENCY,
  RGB_ALPHA = RGB_TRANSPARENCY,
  DEPTH
}

Public Member Functions

virtual SoType getTypeId () const
 SoRenderToTextureProperty ()
void setGLRenderAction (SoGLRenderAction *ra)
SoGLRenderActiongetGLRenderAction () const

Static Public Member Functions

static SoType getClassTypeId ()

Public Attributes

SoMFNode node
SoMFPath path
SoSFEnum updatePolicy
SoSFColor backgroundColor
SoSFVec2s size
SoSFEnum component
SoSFTrigger trigger

Deprecated



SoDEPRECATED void setGraphicConfigTemplate (SoGLGraphicConfigTemplate *)
SoDEPRECATED
SoGLGraphicConfigTemplate
getGraphicConfigTemplate ()
SoDEPRECATED void setContextForSharing (SoGLContext *)

Detailed Description

VSG extension Class for creating a texture by rendering a scene graph

This class is used to define an image for texture mapping which is created by rendering a scene graph.

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

SEE ALSO

SoTexture2, SoTextureCubeMap

See related examples:

RenderToTexture, MedicalMagicGlass, MedicalMagnifier


Member Enumeration Documentation

Rendering component enumeration values.

Enumerator:
RGB 

Default.

The RGB components are rendered to the texture.

RGB_TRANSPARENCY 

The RGB and alpha components are rendered to the texture.

RGB_ALPHA 
DEPTH 

The depth component is rendered to the texture.

Update Policy enumeration values.

Enumerator:
EACH_FRAME 

The texture is updated at each traversal of the shape it is mapped to.

WHEN_NEEDED 

Default.

The texture is updated only if the path or node fields have changed.

ON_TRIGGER 

The texture is updated only if the trigger field is touched.


Constructor & Destructor Documentation

SoRenderToTextureProperty::SoRenderToTextureProperty (  ) 

Member Function Documentation

static SoType SoRenderToTextureProperty::getClassTypeId (  )  [static]

Returns the type identifier for this class.

Reimplemented from SoNode.

SoGLRenderAction* SoRenderToTextureProperty::getGLRenderAction (  )  const

Returns the render action used for rendering the scene.

SoDEPRECATED SoGLGraphicConfigTemplate* SoRenderToTextureProperty::getGraphicConfigTemplate (  )  [inline]
Deprecated:

Deprecated since Open Inventor 10000
No more used. Related to deprecated PBuffer implementation. Always return NULL
virtual SoType SoRenderToTextureProperty::getTypeId (  )  const [virtual]

Returns the type identifier for this specific instance.

Reimplemented from SoNode.

SoDEPRECATED void SoRenderToTextureProperty::setContextForSharing ( SoGLContext  )  [inline]
Deprecated:

Deprecated since Open Inventor 10000
No more used. Related to deprecated PBuffer implementation.
void SoRenderToTextureProperty::setGLRenderAction ( SoGLRenderAction ra  ) 

Specifies a custom render action to use for rendering the scene.

SoDEPRECATED void SoRenderToTextureProperty::setGraphicConfigTemplate ( SoGLGraphicConfigTemplate  )  [inline]
Deprecated:

Deprecated since Open Inventor 10000
No more used. Related to deprecated PBuffer implementation.

Member Data Documentation

Background color used when rendering the scene graph.

Black by default.

Specifies the type of component(s) for the rendering.

Use enum Component. Default is RGB.

Specifies the scene graph(s) (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:

  • imagePosX (left)
  • imageNegX (right)
  • imagePosY (bottom)
  • imageNegY (top)
  • imagePosZ (back)
  • imageNegZ (front)

The node field has priority over the path field. Null by default.

Specifies the scene graph(s) (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:

  • imagePosX (left)
  • imageNegX (right)
  • imagePosY (bottom)
  • imageNegY (top)
  • imagePosZ (back)
  • imageNegZ (front)

The node field has priority over the path field. Null by default.

Size in pixels of the rendered texture.

(0, 0) by default.

Trigger field to render the scene into the Pbuffer.

Effective only if updatePolicy is ON_TRIGGER.

Specifies the policy for rendering to the texture.

Use enum UpdatePolicy. Default is WHEN_NEEDED.


The documentation for this class was generated from the following file:

Open Inventor Toolkit reference manual, generated on 15 Mar 2023
Copyright © Thermo Fisher Scientific All rights reserved.
http://www.openinventor.com/