Class for creating a texture by rendering a scene graph More...
#include <Inventor/nodes/SoRenderToTextureProperty.h>
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) |
SoGLRenderAction * | getGLRenderAction () 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 *) |
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).
node | [] |
path | "" |
updatePolicy | WHEN_NEEDED |
backgroundColor | 0 0 0 |
size | 0 0 |
component | RGB |
SoRenderToTextureProperty::SoRenderToTextureProperty | ( | ) |
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] |
virtual SoType SoRenderToTextureProperty::getTypeId | ( | ) | const [virtual] |
Returns the type identifier for this specific instance.
Reimplemented from SoNode.
SoDEPRECATED void SoRenderToTextureProperty::setContextForSharing | ( | SoGLContext * | ) | [inline] |
void SoRenderToTextureProperty::setGLRenderAction | ( | SoGLRenderAction * | ra | ) |
Specifies a custom render action to use for rendering the scene.
SoDEPRECATED void SoRenderToTextureProperty::setGraphicConfigTemplate | ( | SoGLGraphicConfigTemplate * | ) | [inline] |
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:
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:
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.