Open Inventor Release 2024.1.1
 
Loading...
Searching...
No Matches
SoXtRenderArea Class Reference

Component for rendering Open Inventor scene graphs. More...

#include <Inventor/Xt/SoXtRenderArea.h>

+ Inheritance diagram for SoXtRenderArea:

Public Types

typedef SbBool SoXtRenderAreaEventCB(void *userData, XAnyEvent *anyevent)
 
typedef SbBool SoXtRenderAreaRenderCB(void *userData, SoXtRenderArea *rendArea)
 
- Public Types inherited from SoXtGLWidget
enum  FloatColorBufferSize {
  FLOAT_16_COLOR_BUFFER = SoGuiGLWidget::FLOAT_16_COLOR_BUFFER ,
  FLOAT_32_COLOR_BUFFER = SoGuiGLWidget::FLOAT_32_COLOR_BUFFER
}
 FloatColorBufferSize. More...
 
- Public Types inherited from SoXtComponent
typedef void SoXtComponentCB(void *data, SoXtComponent *v)
 

Public Member Functions

 SoXtRenderArea (SoWidget parent=NULL, const char *name=NULL, SbBool buildInsideParent=TRUE, SbBool getMouseInput=TRUE, SbBool getKeyboardInput=TRUE)
 Constructor which is passed arguments which tell it whether to register the mouse and keyboard devices by default (SoXtMouse and SoXtKeyboard).
 
 ~SoXtRenderArea ()
 Destructor.
 
virtual void setSceneGraph (SoNode *newScene)
 Sets the scene graph to be rendered in this component's window.
 
virtual SoNodegetSceneGraph ()
 Gets the scene graph to be rendered in this component's window.
 
void registerDevice (SoXtDevice *d)
 Registers interest in devices.
 
void unregisterDevice (SoXtDevice *d)
 Unregisters interest in devices.
 
void setBackgroundColor (const SbColor &c)
 Sets the background color for this window.
 
SbColor getBackgroundColor () const
 Gets the background color for this window.
 
void setBackgroundIndex (int index)
 Sets the window background color when in color index mode.
 
int getBackgroundIndex () const
 Gets the window background color when in color index mode.
 
void setColorMap (int startIndex, int num, const SbColor *colors)
 Sets the colors to use when displaying in color index mode.
 
void setViewportRegion (const SbViewportRegion &newRegion)
 Sets viewport region to use for rendering.
 
const SbViewportRegiongetViewportRegion () const
 Gets current viewport region to use for rendering.
 
void setTransparencyType (SoGLRenderAction::TransparencyType type)
 Sets the algorithm for rendering transparent objects.
 
SoGLRenderAction::TransparencyType getTransparencyType () const
 Gets the algorithm for rendering transparent objects.
 
void setFastEditSavePolicy (SoGLRenderAction::FastEditSavePolicy policy, SbBool fastEditDelayedObjects=FALSE)
 Sets fast editing save policy to use when rendering.
 
SoGLRenderAction::FastEditSavePolicy getFastEditSavePolicy () const
 Returns fast editing save policy used when rendering.
 
void setInvalidateCacheMode (SoGLRenderAction::InvalidateCacheMode icm)
 Enables or disables the invalidation of render caches.
 
SoGLRenderAction::InvalidateCacheMode getInvalidateCacheMode ()
 Returns the current cache invalidation mode.
 
void setClearBeforeRender (SbBool trueOrFalse, SbBool zbTrueOrFalse=TRUE)
 Enables/prevents window clearing from happening before a rendering starts (default is clear TRUE).
 
SbBool isClearBeforeRender () const
 Queries whether the window will be cleared before rendering starts.
 
SbBool isClearZBufferBeforeRender () const
 Queries whether the depth buffer (sometimes called the Z buffer) will be cleared before rendering starts.
 
void setAutoRedraw (SbBool trueOrFalse)
 The render area will automatically redraw whenever something in the scene graph changes.
 
SbBool isAutoRedraw () const
 Queries whether the render area will automatically redraw whenever something in the scene graph changes.
 
void setRedrawPriority (uint32_t priority)
 Sets the priority of the redraw sensor.
 
uint32_t getRedrawPriority () const
 Gets the priority of the redraw sensor.
 
void render ()
 Calling this forces the render area to be redrawn now.
 
void scheduleRedraw ()
 Schedules a redraw to happen sometime soon (as opposed to immediately).
 
void redrawOnSelectionChange (SoSelection *s)
 Call this convenience method to have this render area redraw whenever the selection list changes in the passed node.
 
void setEventCallback (SoXtRenderAreaEventCB *fcn, void *userData=NULL)
 X events which occur in the render area window are either directly handled by the viewer (when this is really a viewer) or automatically translated to SoEvents, then passed into the scene graph (via the SoHandleEventAction) so that live scene graph objects can handle the event (when viewers are not in viewing mode).
 
void setSceneManager (SoSceneManager *sm)
 Sets the normal scene manager.
 
SoSceneManagergetSceneManager () const
 Gets the normal scene manager.
 
void setGLRenderAction (SoGLRenderAction *ra)
 Sets the GL render action to use.
 
SoGLRenderActiongetGLRenderAction () const
 Gets the current GL render action.
 
const SbGLShareContext getShareContext ()
 Returns the information needed to make OpenGL render contexts share OpenGL objects, for example, display lists and texture objects.
 
void setPostRenderCallback (SoXtRenderAreaRenderCB *fcn, void *userData=NULL)
 Specifies a function to be called after the Open Inventor render traversal and immediately before the OpenGL buffer swap.
 
SoXtRenderAreaRenderCB * getPostRenderCallback (const void *&userData) const
 Gets the post-render callback function and data.
 
void setFloatingColorBuffer (SbBool enable, FloatColorBufferSize size=FLOAT_16_COLOR_BUFFER)
 Enables/disables floating point rendering using 16- or 32-bit components.
 
void getFloatingColorBuffer (SbBool &enable, FloatColorBufferSize &size)
 Returns TRUE if floating point rendering is used and its precision.
 
void sendEvent (XAnyEvent *anEvent)
 Sends the event to be processed by the renderArea.
 
virtual void setMPEGRecorder (SoMPEGRenderer *recorder)
 Sets the recorder used for MPEG encoding.
 
virtual SoMPEGRenderergetMPEGRecorder () const
 Returns the recorder used for the MPEG encoding.
 
Deprecated
SoDEPRECATED void setAntialiasing (SbBool smoothing, int numPasses)
 Enables smoothing and/or multi-pass antialiasing for rendering.
 
SoDEPRECATED void getAntialiasing (SbBool &smoothing, int &numPasses) const
 Gets the antialiasing used for rendering.
 
void setAntialiasing (const float quality, const SoSceneManager::AntialiasingMode mode=SoSceneManager::AUTO)
 Enable (or disable) antialiasing with specified quality and mode.
 
void setAntialiasing (SoAntialiasingParameters *advancedParameters)
 Enable (or disable) antialiasing with specific parameters.
 
- Public Member Functions inherited from SoXtGLWidget
int getColorMapSize ()
 Returns the color map size.
 
virtual Window getNormalWindow ()
 Gets the current normal GL window, which is needed as an argument to glXMakeCurrent() when drawing in the normal planes.
 
SbGlContextHelper::GLContext getNormalContext () const
 Gets the current normal context, which is needed as an argument to glXMakeCurrent() when drawing in the normal planes.
 
SoGLContextgetNormalSoContext () const
 
SoWidget getNormalWidget () const
 Gets the current normal widget, which is needed as an argument to glXMakeCurrent() when drawing in the normal planes.
 
virtual void setNormalVisual (XVisualInfo *vis)
 Specify exactly what the visual should be for the normal window.
 
XVisualInfo * getNormalVisual ()
 Returns the visual for the normal window.
 
virtual void setDoubleBuffer (SbBool onOrOff)
 Routine that dynamically changes between single and double buffering.
 
SbBool isDoubleBuffer ()
 Returns whether double buffering is on or off.
 
void setAntialiasing (const float quality, const SoSceneManager::AntialiasingMode mode=SoSceneManager::AUTO)
 Enable (or disable) antialiasing with specified quality and mode.
 
void setAntialiasing (SoAntialiasingParameters *advancedParameters)
 Enable (or disable) antialiasing with specific parameters.
 
float getAntialiasingQuality () const
 Returns the antialiasing quality set using the setAntialiasing(float,AntialiasingMode) method.
 
SoSceneManager::AntialiasingMode getAntialiasingMode () const
 Returns the antialiasing mode set using the setAntialiasing(float,AntialiasingMode) method.
 
SoAntialiasingParametersgetAntialiasingParameters () const
 Returns the antialiasing parameters set using the setAntialiasing(SoAntialiasingParameters*) method.
 
void setBorder (SbBool onOrOff)
 Shows/hides a border of thickness 3 around the glX widgets.
 
SbBool isBorder () const
 Returns whether the border is on or off.
 
void setDrawToFrontBufferEnable (SbBool enableFlag)
 Sets drawing to the front buffer.
 
SbBool isDrawToFrontBufferEnable () const
 Queries drawing to the front buffer.
 
virtual SbBool bindNormalContext ()
 Makes the normal rendering context the current context.
 
virtual SbBool unbindNormalContext ()
 unbind the current context (previously bind with bindNormalContext );
 
virtual SbBool swapNormalBuffers ()
 Swaps the normal front and back buffers.
 
SoGLGraphicConfigTemplategetGraphicConfigTemplate ()
 Gets the current graphics configuration template.
 
void setGraphicConfigTemplate (SoGLGraphicConfigTemplate *gTemplate)
 Sets a new graphics configuration template.
 
void setFloatingColorBuffer (SbBool enable, FloatColorBufferSize size=FLOAT_16_COLOR_BUFFER)
 Enables/disables floating point rendering using 16- or 32-bit components.
 
void getFloatingColorBuffer (SbBool &enable, FloatColorBufferSize &size)
 Returns TRUE if floating point rendering is used and its precision.
 
bool saveSnapshot (const SbString &filename, bool overwrite=true)
 Save a snapshot of the current image displayed in the viewer.
 
- Public Member Functions inherited from SoXtComponent
virtual void show ()
 This shows the component.
 
virtual void hide ()
 This hides the component.
 
SbBool isVisible ()
 Returns TRUE if this component is mapped onto the screen.
 
SoWidget getWidget () const
 This returns the base widget for this component.
 
SbBool isTopLevelShell () const
 Returns TRUE if this component is a top level shell component (has its own window).
 
SoWidget getShellWidget () const
 Returns the shell widget (NULL if the shell hasn't been created by this component).
 
SoWidget getParentWidget () const
 Returns the parent widget, be it a shell or not.
 
void setSize (const SbVec2s &size)
 Convenience routine on the widget.
 
SbVec2s getSize ()
 Convenience routine on the widget.
 
SbBool setFullScreen (const SbBool enable)
 Switches the viewer into (or out of) fullscreen mode.
 
SbBool isFullScreen (void) const
 Queries if the viewer is in fullscreen mode.
 
void setFullScreenEnable (const SbBool enable)
 Enables/disables fullscreen mode.
 
SbBool isFullScreenEnable () const
 Queries if it is possible to put the viewer in fullscreen mode.
 
Display * getDisplay ()
 Returns the X display associated with this components widget.
 
SoNONUNICODE void setTitle (const char *newTitle)
 Sets window title.
 
void setTitle (const SbString &newTitle)
 Sets window title.
 
SbString getTitle () const
 Gets window title.
 
SoNONUNICODE void setIconTitle (const char *newIconTitle)
 Sets icon title.
 
void setIconTitle (const SbString &newIconTitle)
 Sets icon title.
 
SbString getIconTitle () const
 Gets icon title.
 
void setWindowCloseCallback (SoXtComponentCB *func, void *data=NULL)
 Sets which callback to call when the user closes this component (double click in the upper left corner) - by default hide() is called on this component, unless a callback is set to something other than NULL.
 
SbString getWidgetName () const
 Returns the widget name.
 
SbString getClassName () const
 Returns the class name.
 

Static Public Member Functions

static uint32_t getDefaultRedrawPriority ()
 Gets the default priority number of the redraw sensor.
 
- Static Public Member Functions inherited from SoXtComponent
static void displayHelp (const char *filename, UINT contextID)
 Static method to display the specified topic of the specified help file.
 
static SoXtComponentgetComponent (SoWidget w)
 This returns the SoXtComponent for this widget.
 

Detailed Description

Component for rendering Open Inventor scene graphs.

This class provides Open Inventor rendering and event handling inside a GLX Motif widget. There is a routine to specify the scene to render. The scene is automatically rendered whenever anything under it changes (a data sensor is attached to the root of the scene), unless explicitly told not to do so (manual redraws). Users can also set Open Inventor rendering attributes such as the transparency algorithm, antialiasing on or off, etc. This class employs an SoSceneManager to manage rendering and event handling.

X events that occur in the render area can be handled by the application, by the viewer (if this is really a viewer), or by the nodes in the scene graph. When a event occurs, it is first passed to the application event callback function registered with the setEventCallback() method on SoXtRenderArea. If this function does not exist or returns FALSE, the X event is either used directly by the viewer or translated to an SoEvent for further scene graph processing. If the viewer does not handle the event, the SoEvent is sent to that scene graph by way of an SoHandleEventAction.

RESOURCES

      *SoXtRenderArea*BackgroundColor: black (color name or hex value)
    

SEE ALSO

SoXtGLWidget, SoXtComponent, SoXtViewer, SoSceneManager, SoBoxHighlightRenderAction, SoHaloHighlightRenderAction, SoLineHighlightRenderAction

Definition at line 139 of file SoXtRenderArea.h.

Member Typedef Documentation

◆ SoXtRenderAreaEventCB

typedef SbBool SoXtRenderAreaEventCB(void *userData, XAnyEvent *anyevent)

Definition at line 88 of file SoXtRenderArea.h.

◆ SoXtRenderAreaRenderCB

typedef SbBool SoXtRenderAreaRenderCB(void *userData, SoXtRenderArea *rendArea)

Definition at line 90 of file SoXtRenderArea.h.

Constructor & Destructor Documentation

◆ SoXtRenderArea()

SoXtRenderArea::SoXtRenderArea ( SoWidget  parent = NULL,
const char *  name = NULL,
SbBool  buildInsideParent = TRUE,
SbBool  getMouseInput = TRUE,
SbBool  getKeyboardInput = TRUE 
)

Constructor which is passed arguments which tell it whether to register the mouse and keyboard devices by default (SoXtMouse and SoXtKeyboard).

◆ ~SoXtRenderArea()

SoXtRenderArea::~SoXtRenderArea ( )

Destructor.

Member Function Documentation

◆ getAntialiasing()

SoDEPRECATED void SoXtRenderArea::getAntialiasing ( SbBool smoothing,
int &  numPasses 
) const

Gets the antialiasing used for rendering.

◆ getBackgroundColor()

SbColor SoXtRenderArea::getBackgroundColor ( ) const
inline

Gets the background color for this window.

Definition at line 192 of file SoXtRenderArea.h.

◆ getBackgroundIndex()

int SoXtRenderArea::getBackgroundIndex ( ) const
inline

Gets the window background color when in color index mode.

Definition at line 203 of file SoXtRenderArea.h.

◆ getDefaultRedrawPriority()

static uint32_t SoXtRenderArea::getDefaultRedrawPriority ( )
inlinestatic

Gets the default priority number of the redraw sensor.

Definition at line 326 of file SoXtRenderArea.h.

◆ getFastEditSavePolicy()

SoGLRenderAction::FastEditSavePolicy SoXtRenderArea::getFastEditSavePolicy ( ) const
inline

Returns fast editing save policy used when rendering.

Definition at line 255 of file SoXtRenderArea.h.

◆ getFloatingColorBuffer()

void SoXtRenderArea::getFloatingColorBuffer ( SbBool enable,
FloatColorBufferSize size 
)

Returns TRUE if floating point rendering is used and its precision.

◆ getGLRenderAction()

SoGLRenderAction * SoXtRenderArea::getGLRenderAction ( ) const
inline

Gets the current GL render action.

Definition at line 395 of file SoXtRenderArea.h.

◆ getInvalidateCacheMode()

SoGLRenderAction::InvalidateCacheMode SoXtRenderArea::getInvalidateCacheMode ( )

Returns the current cache invalidation mode.

◆ getMPEGRecorder()

virtual SoMPEGRenderer * SoXtRenderArea::getMPEGRecorder ( ) const
inlinevirtual

Returns the recorder used for the MPEG encoding.

Definition at line 466 of file SoXtRenderArea.h.

◆ getPostRenderCallback()

SoXtRenderAreaRenderCB * SoXtRenderArea::getPostRenderCallback ( const void *&  userData) const
inline

Gets the post-render callback function and data.

Returns NULL if no callback has been specified by the application.

Definition at line 425 of file SoXtRenderArea.h.

◆ getRedrawPriority()

uint32_t SoXtRenderArea::getRedrawPriority ( ) const
inline

Gets the priority of the redraw sensor.

Definition at line 321 of file SoXtRenderArea.h.

◆ getSceneGraph()

virtual SoNode * SoXtRenderArea::getSceneGraph ( )
virtual

Gets the scene graph to be rendered in this component's window.

Reimplemented in SoXtViewer.

◆ getSceneManager()

SoSceneManager * SoXtRenderArea::getSceneManager ( ) const
inline

Gets the normal scene manager.

Note: For convenience most of the SoSceneManager methods have already been added to this class.

Definition at line 379 of file SoXtRenderArea.h.

◆ getShareContext()

const SbGLShareContext SoXtRenderArea::getShareContext ( )

Returns the information needed to make OpenGL render contexts share OpenGL objects, for example, display lists and texture objects.

◆ getTransparencyType()

SoGLRenderAction::TransparencyType SoXtRenderArea::getTransparencyType ( ) const
inline

Gets the algorithm for rendering transparent objects.

See SoGLRenderAction for possible transparency types.

Definition at line 238 of file SoXtRenderArea.h.

◆ getViewportRegion()

const SbViewportRegion & SoXtRenderArea::getViewportRegion ( ) const
inline

Gets current viewport region to use for rendering.

Definition at line 220 of file SoXtRenderArea.h.

◆ isAutoRedraw()

SbBool SoXtRenderArea::isAutoRedraw ( ) const
inline

Queries whether the render area will automatically redraw whenever something in the scene graph changes.

Definition at line 311 of file SoXtRenderArea.h.

◆ isClearBeforeRender()

SbBool SoXtRenderArea::isClearBeforeRender ( ) const
inline

Queries whether the window will be cleared before rendering starts.

Definition at line 293 of file SoXtRenderArea.h.

◆ isClearZBufferBeforeRender()

SbBool SoXtRenderArea::isClearZBufferBeforeRender ( ) const
inline

Queries whether the depth buffer (sometimes called the Z buffer) will be cleared before rendering starts.

Definition at line 299 of file SoXtRenderArea.h.

◆ redrawOnSelectionChange()

void SoXtRenderArea::redrawOnSelectionChange ( SoSelection s)

Call this convenience method to have this render area redraw whenever the selection list changes in the passed node.

This is useful if using a highlight render action like the SoHaloHighlightRenderAction to correctly render whenever the selection changes. Pass NULL to turn this off.

This call increases the ref counter of the given SoSelection node, it will be automatically decreased when the selection node is replaced by another one, or if it is turned off.

◆ registerDevice()

void SoXtRenderArea::registerDevice ( SoXtDevice d)

Registers interest in devices.

When a device is registered, messages from that device will be processed by the render area, and passed into the scene graph. Messages from unregistered devices will be ignored.

◆ render()

void SoXtRenderArea::render ( )
inline

Calling this forces the render area to be redrawn now.

It is not necessary to call this method if auto redraw is enabled (which is the default).

Definition at line 332 of file SoXtRenderArea.h.

◆ scheduleRedraw()

void SoXtRenderArea::scheduleRedraw ( )

Schedules a redraw to happen sometime soon (as opposed to immediately).

This can be used to compress multiple redraws.

◆ sendEvent()

void SoXtRenderArea::sendEvent ( XAnyEvent *  anEvent)

Sends the event to be processed by the renderArea.

◆ setAntialiasing() [1/3]

void SoXtGLWidget::setAntialiasing ( const float  quality,
const SoSceneManager::AntialiasingMode  mode = SoSceneManager::AUTO 
)

Enable (or disable) antialiasing with specified quality and mode.

Specific antialiasing parameters will be set automatically based on the quality value. Note that the quality and mode settings are overridden if specific antialiasing parameters are subsequently set using the setAntialiasing(SoAntialiasingParameters*) method.

The default mode is AUTO but this may be overridden by setting the environment variable OIV_ANTIALIASING_DEFAULT_MODE (see SoPreferences).

Parameters
qualityThe quality is a factor in the range [0.0,1.0].
Use the value 0.0 to turn off antialiasing. 0.5 is a typical value.
modeThe antialiasing algorithm. Default is AUTO, which means use the best for the current hardware.
Use the value NO_ANTIALIASING to turn off antialiasing.

◆ setAntialiasing() [2/3]

SoDEPRECATED void SoXtRenderArea::setAntialiasing ( SbBool  smoothing,
int  numPasses 
)

Enables smoothing and/or multi-pass antialiasing for rendering.

There are two kinds of antialiasing available: smoothing and multipass antialiasing. If smoothing is set to TRUE, smoothing is enabled. Smoothing uses OpenGL's line- and point-smoothing features to provide cheap antialiasing of lines and points. The value of numPasses controls multipass antialiasing. Each time a render action is applied, Open Inventor renders the scene numPasses times from slightly different camera positions, averaging the results. numPasses can be from one to 255, inclusive. Setting numPasses to one disables multipass antialiasing. You can use either, both, or neither of these antialiasing techniques. By default, both smoothing and multipass antialiasing are disabled.

◆ setAntialiasing() [3/3]

void SoXtGLWidget::setAntialiasing ( SoAntialiasingParameters advancedParameters)

Enable (or disable) antialiasing with specific parameters.

Use one of the subclasses of SoAntialiasingParameters. The antialiasing mode is determined by which subclass is used to set the parameters. For example, passing an SoFXAAParameters object automatically sets FXAA mode. Note that the parameters are overridden if a quality and mode are subsequently set using the setAntialiasing(float,AntialiasingMode) method.

NOTES

    • When the antialiasing parameters are modified a listener is called if it has been defined. See also setAntialiasingEventListener().
    • The caller is responsible for allocation and destruction of the advancedParameters object. SoSceneManager makes a copy of the parameter values, so the object can be destroyed after calling this method.
    Parameters
    advancedParametersProvides specific parameters for an antialiasing mode.
    Use a null parameter to turn off antialiasing or use one of the subclasses of SoAntialiasingParameters.

◆ setAutoRedraw()

void SoXtRenderArea::setAutoRedraw ( SbBool  trueOrFalse)

The render area will automatically redraw whenever something in the scene graph changes.

Passing FALSE will disable this feature.

◆ setBackgroundColor()

void SoXtRenderArea::setBackgroundColor ( const SbColor c)

Sets the background color for this window.

Default is black (0,0,0).

The default value can be set using the environment variable OIV_BACKGROUND_COLOR (3 floats representing RGB values of the colors separated by space).

◆ setBackgroundIndex()

void SoXtRenderArea::setBackgroundIndex ( int  index)
inline

Sets the window background color when in color index mode.

Default is black (index 0)).

Definition at line 198 of file SoXtRenderArea.h.

◆ setClearBeforeRender()

void SoXtRenderArea::setClearBeforeRender ( SbBool  trueOrFalse,
SbBool  zbTrueOrFalse = TRUE 
)
inline

Enables/prevents window clearing from happening before a rendering starts (default is clear TRUE).

This can be useful to limit flickering when doing single buffering and geometry covers the entire window (used in the material editor). Also controls whether the depth buffer (sometimes called the Z buffer) is cleared before rendering.

Definition at line 287 of file SoXtRenderArea.h.

◆ setColorMap()

void SoXtRenderArea::setColorMap ( int  startIndex,
int  num,
const SbColor colors 
)

Sets the colors to use when displaying in color index mode.

This will load the color map with the given colors at the starting index.

◆ setEventCallback()

void SoXtRenderArea::setEventCallback ( SoXtRenderAreaEventCB fcn,
void *  userData = NULL 
)

X events which occur in the render area window are either directly handled by the viewer (when this is really a viewer) or automatically translated to SoEvents, then passed into the scene graph (via the SoHandleEventAction) so that live scene graph objects can handle the event (when viewers are not in viewing mode).

This method allows the application to register a callback for handling events that occur in the window, instead of sending them to the viewers or down the graph. The callback is passed the X events, and should return TRUE if it handled the event. If the callback returns FALSE, then the event will be handled by the render area.

◆ setFastEditSavePolicy()

void SoXtRenderArea::setFastEditSavePolicy ( SoGLRenderAction::FastEditSavePolicy  policy,
SbBool  fastEditDelayedObjects = FALSE 
)

Sets fast editing save policy to use when rendering.

The default is WHEN_NEEDED. Valid values are DISABLE, EACH_FRAME, and WHEN_NEEDED. See SoSeparator.

If fastEditDelayedObjects is set to TRUE, delayed objects won't be redrawn when editing the scene graph. It means that composition between delayed transparent objects and fast edit scene graph won't be correct but redrawing may be much faster.

◆ setFloatingColorBuffer()

void SoXtRenderArea::setFloatingColorBuffer ( SbBool  enable,
FloatColorBufferSize  size = FLOAT_16_COLOR_BUFFER 
)

Enables/disables floating point rendering using 16- or 32-bit components.

If TRUE, Open Inventor will automatically render to an offscreen floating point buffer, and copy the resulting image to the screen.

To determine if floating point rendering was successfully enabled, use getFloatingColorBuffer, below.

Using floating point rendering can improve image quality, particularly when many objects are being blended, for example, in volume rendering. This is a convenience method as you could accomplish the same results setting up a graphic template.

◆ setGLRenderAction()

void SoXtRenderArea::setGLRenderAction ( SoGLRenderAction ra)

Sets the GL render action to use.

This is used to set selection highlighting with the SoBoxHighlightRenderAction, SoHaloHighlightRenderAction and SoLineHighlightRenderAction classes.

Note: Properties of the previous render action, for example transparency type, are not automatically copied to the new render action. The application must explicitly set the desired properties of the new render action.

◆ setInvalidateCacheMode()

void SoXtRenderArea::setInvalidateCacheMode ( SoGLRenderAction::InvalidateCacheMode  icm)

Enables or disables the invalidation of render caches.

  • When set to ALWAYS, the caches are invalidated for each SoSeparator node before its children are traversed. No new caches will be built. This value forces all nodes to be visited during each render traversal.
  • When set to ONCE, the caches are invalidated for each SoSeparator node before its children are traversed. The invalidate cache mode is automatically changed to OFF at the end of the traversal.
  • When set to OFF (default), caches are managed by their respective render caching nodes in the usual way.

This method is useful to force all nodes to be visited during render traversal.

◆ setMPEGRecorder()

virtual void SoXtRenderArea::setMPEGRecorder ( SoMPEGRenderer recorder)
inlinevirtual

Sets the recorder used for MPEG encoding.

Default is none.

Parameters
recorderthe recorder to be used.

Definition at line 460 of file SoXtRenderArea.h.

◆ setPostRenderCallback()

void SoXtRenderArea::setPostRenderCallback ( SoXtRenderAreaRenderCB *  fcn,
void *  userData = NULL 
)
inline

Specifies a function to be called after the Open Inventor render traversal and immediately before the OpenGL buffer swap.

Generally the application should not modify Open Inventor state in these callbacks, but they can be useful for special effects using OpenGL calls.

When the callback function is called, Open Inventor has completed normal rendering (including delayed transparent objects, multi-pass, etc), but no "end of frame" calls (glFlush, glFinish, SwapBuffers...) have been made. The function should return TRUE if "end of frame" handling has been done by the application (Open Inventor will do nothing in this case). If FALSE is returned, Open Inventor will do its normal end of frame calls (normally calling SwapBuffers).

Definition at line 418 of file SoXtRenderArea.h.

◆ setRedrawPriority()

void SoXtRenderArea::setRedrawPriority ( uint32_t  priority)
inline

Sets the priority of the redraw sensor.

Definition at line 316 of file SoXtRenderArea.h.

◆ setSceneGraph()

virtual void SoXtRenderArea::setSceneGraph ( SoNode newScene)
virtual

Sets the scene graph to be rendered in this component's window.

Reimplemented in SoXtViewer.

◆ setSceneManager()

void SoXtRenderArea::setSceneManager ( SoSceneManager sm)

Sets the normal scene manager.

Note: For convenience most of the SoSceneManager methods have already been added to this class.

◆ setTransparencyType()

void SoXtRenderArea::setTransparencyType ( SoGLRenderAction::TransparencyType  type)

Sets the algorithm for rendering transparent objects.

Default is NO_SORT. See SoGLRenderAction for possible transparency types. See also SoGLRenderAction::TransparencyType.

Note: When using OPAQUE_FIRST, SORTED_OBJECT or SORTED_PIXEL transparency, the depth buffer is not updated (depth buffer writes are disabled) while rendering transparent objects. As a result complex 3D shapes may not be rendered correctly.

◆ setViewportRegion()

void SoXtRenderArea::setViewportRegion ( const SbViewportRegion newRegion)
inline

Sets viewport region to use for rendering.

Definition at line 214 of file SoXtRenderArea.h.

◆ unregisterDevice()

void SoXtRenderArea::unregisterDevice ( SoXtDevice d)

Unregisters interest in devices.

When a device is registered, messages from that device will be processed by the render area, and passed into the scene graph. Messages from unregistered devices will be ignored.


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