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
void setGraphicConfigTemplate (SoGLGraphicConfigTemplate *gct)
SoGLGraphicConfigTemplategetGraphicConfigTemplate ()
void setContextForSharing (SoGLContext *context)

Static Public Member Functions

static SoType getClassTypeId ()

Public Attributes

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

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.

SoGLGraphicConfigTemplate* SoRenderToTextureProperty::getGraphicConfigTemplate (  ) 

Returns the graphic config template used for rendering the scene.

virtual SoType SoRenderToTextureProperty::getTypeId (  )  const [virtual]

Returns the type identifier for this specific instance.

Reimplemented from SoNode.

void SoRenderToTextureProperty::setContextForSharing ( SoGLContext context  ) 

Set OpenGL render context for display list sharing.

Must be set before calling the create() method. There is no guarantee that sharing will be allowed.

void SoRenderToTextureProperty::setGLRenderAction ( SoGLRenderAction ra  ) 

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

void SoRenderToTextureProperty::setGraphicConfigTemplate ( SoGLGraphicConfigTemplate gct  ) 

Specifies a custom graphic config template to use for rendering the scene.


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)
  • imagePosY (bottom)
  • imagePosZ (back)
  • imageNegX (right)
  • imageNegY (top)
  • 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)
  • imagePosY (right)
  • imagePosZ (top)
  • imageNegX (bottom)
  • imageNegY (back)
  • imageNegZ (front)

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

Size in pixels of the rendered texture.

If the size is not a power of two (e.g. 128 or 256) and the OpenGL extension texture_non_power_of_two is not supported by the GPU, the size will be automatically scaled to the next power of two (less effective). (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 by FEI reference manual, generated on 19 Aug 2019
Copyright © FEI S.A.S. All rights reserved.
http://www.openinventor.com/