SoOffscreenRenderArea Class Reference
[General]

Render to an off-screen buffer for printing or generating textures. More...

#include <Inventor/SoOffscreenRenderArea.h>

Inheritance diagram for SoOffscreenRenderArea:
SoRefCounter SiRenderArea SiRenderAreaAntialiasing SiRenderAreaTransparency

List of all members.

Classes

struct  EventArg
 Event that can be sent to the application for each tile rendered. More...

Public Types

enum  OutputFormat {
  RGB,
  RGBA
}

Public Member Functions

 SoOffscreenRenderArea ()
 SoOffscreenRenderArea (SoGLContext *glContex)
 SoOffscreenRenderArea (SoRenderAreaCore *renderAreaCore)
 ~SoOffscreenRenderArea ()
virtual void setSceneGraph (SoNode *newScene)
virtual SoNodegetSceneGraph () const
void setViewportRegion (const SbViewportRegion &newRegion)
SbViewportRegion getViewportRegion () const
virtual void setTransparencyType (SoGLRenderAction::TransparencyType type)
virtual
SoGLRenderAction::TransparencyType 
getTransparencyType () const
SoSceneManagergetSceneManager () const
bool renderToFile (const SbString &filename, OutputFormat outputFormat=RGB) const
bool renderToBuffer (SoBufferObject *buffer, OutputFormat outputFormat=RGB) const
void setTile (SbVec2i32 size, int numEdgePixels)
SbVec2i32 getTileSize () const
int getNumEdgePixels () const
virtual ClearPolicy getClearPolicy () const
virtual void setClearPolicy (ClearPolicy policy)
virtual void setClearColor (const SbColorRGBA &color)
virtual SbColorRGBA getClearColor () const
virtual void setClearDepth (float depth)
virtual float getClearDepth () const
virtual void setSize (const SbVec2i32 &size)
virtual SbVec2i32 getSize () const
virtual void setGLRenderAction (SoGLRenderAction *glAction)
virtual SoGLRenderActiongetGLRenderAction () const
virtual SbEventHandler
< RenderEventArg & > & 
onStartRender ()
virtual void setAntialiasingMode (SoSceneManager::AntialiasingMode mode)
virtual
SoSceneManager::AntialiasingMode 
getAntialiasingMode () const
virtual void setAntialiasingQuality (float quality)
virtual float getAntialiasingQuality () const
virtual RenderStatus render ()

Static Public Member Functions

static SbVec2i32 getMaxTileSize ()

Public Attributes

SbEventHandler< EventArg & > onTileRendered

Detailed Description

Render to an off-screen buffer for printing or generating textures.

This class is used to render a scene graph and to write the the result into a file or a buffer.

This is not a screen capture class. The specified scene graph is rendered to generate an image. This allows generation of images larger (higher resolution) than the user's screen and/or using different (e.g. higher quality) rendering parameters. The offscreen rendering may take more or less time than the same rendering on screen.

The renderer can render very large images because it is able to render the scene as multiple "tiles" and assemble the tiles into a complete image. Of course this requires multiple render traversals of the specified scene graph (one for each tile).

Rendering a "snapshot":

Your application may want to render the same image that the user sees on the screen. There are several things to consider. First, the scene graph given to the renderer must include the camera node that the viewer is using. If the application allows the viewer to create a camera automatically, the scene graph returned by the viewer's getSceneGraph() method does not include the camera. It's always safer to get the SoSceneManager object then get the scene graph. Second, some rendering options are set on the viewer object, not in the scene graph. These options, which include background color and transparency mode, must be explicitly queried from the viewer and set on the renderer object.

Notes & Limitations:

EXAMPLE


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