24#ifndef _SO_WIN_RENDER_AREA_H_
25#define _SO_WIN_RENDER_AREA_H_
27#include <Inventor/Win/SoWinBeginStrict.h>
29#include <Inventor/Win/SoWinDef.h>
33#include <Inventor/SbColor.h>
34#include <Inventor/sensors/SoNodeSensor.h>
35#include <Inventor/SoSceneManager.h>
36#include <Inventor/Win/SoWinGLWidget.h>
37#include <Inventor/actions/SoGLRenderAction.h>
39#include <Inventor/nodes/SoCamera.h>
40#include <Inventor/elements/SoStereoElement.h>
41#include <Inventor/nodes/SoFullSceneAntialiasing.h>
42#include <Inventor/SbElapsedTime.h>
45#include <Inventor/Gui/SoGuiRenderArea.h>
126 const char* name = NULL,
127 SbBool buildInsideParent = TRUE,
128 SbBool getMouseInput = TRUE,
129 SbBool getKeyboardInput = TRUE );
197 { m_guiRenderArea->setViewportRegion( newRegion ); }
203 {
return m_guiRenderArea->getViewportRegion(); }
221 {
return m_guiRenderArea->getTransparencyType(); }
232 SbBool fastEditDelayedObjects = FALSE);
238 {
return m_guiRenderArea->getFastEditSavePolicy(); }
270 { m_guiRenderArea->setClearBeforeRender( trueOrFalse, zbTrueOrFalse ); }
301 void setRedrawPriority(
unsigned long priority ) { m_guiRenderArea->setRedrawPriority(priority); }
430 { appPostRenderCB = fcn; appPostRenderData = userData; }
438 { userData = appPostRenderData;
return appPostRenderCB; }
463 { m_guiRenderArea->setMPEGRecorder( recorder ); }
469 {
return m_guiRenderArea->getMPEGRecorder(); }
508 void setStereoElement();
510 virtual void setDoubleBuffer(
SbBool db );
512 virtual SbBool isInteractive()
const;
524 float stereoBalance, stereoOffset;
525 SbBool stereoAbsoluteAdjustments;
578 virtual void redraw();
579 virtual void actualRedraw();
584 virtual void processEvent( XAnyEvent* anyevent );
585 virtual void initGraphic();
586 virtual void sizeChanged(
const SbVec2s& );
588 virtual void widgetChanged( SoWidget );
590 SoWidget buildWidget( SoWidget parent );
593 virtual SbString getDefaultWidgetName()
const;
594 virtual SbString getDefaultTitle()
const;
595 virtual SbString getDefaultIconTitle()
const;
602 void *defaultAppEventHandlerData;
604 void *appEventHandlerData;
606 SbBool invokeAppCB( XAnyEvent* anyevent );
607 SbBool processInventorEvent( XAnyEvent* anyevent );
608 const SoEvent* translateAnyEvent( XAnyEvent* anyevent );
612 void *appPostRenderData;
616 SbBool m_isFloatingPointRendering;
619#if defined(__linux__)
626 void reinstallDevices( SoWidget newWidget );
628 static void selectionChangeCB(
void* userData,
SoSelection* s );
629 SoWidget m_deviceWidget;
639 static void visibilityChangeCB(
void* pt,
SbBool visible );
642 void constructorCommon(
SbBool getMouseInput,
647 void constructorCommon2(
SbBool getMouseInput,
668 bool m_firstStdRedraw;
669 bool m_firstConnectedRedraw;
671 static void viewerUpdaterCB(
void*,
SoSensor* );
672 void updateFirstFrame();
676#include <Inventor/Win/SoWinEndStrict.h>
Class encapsulating information about an OpenGL context: a handle on an OpenGL context and its id.
List of generic (void *) pointers.
Class for smart character strings.
Class for representing a viewport.
Abstract base class for all actions.
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Antialiasing par...
Base class for all events.
Renders a scene graph using Open Inventor's Render Engine.
FastEditSavePolicy
Fast edit traversal types.
InvalidateCacheMode
Invalidate cache mode.
TransparencyType
Transparency rendering algorithm.
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Common algorithm...
Allows nodes in a graph to receive input events.
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Base class for g...
Abstract base class for all database nodes.
Manages scene graph rendering and event handling.
static uint32_t getDefaultRedrawPriority()
Gets the default priority of the redraw sensor.
Manages a list of selected objects.
Abstract base class for Open Inventor sensors.
Sensor that triggers repeatedly at regular intervals.
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Abstract base cl...
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Translates and r...
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Translates and r...
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Component for re...
void setSceneManager(SoSceneManager *sm)
Sets the normal scene manager.
int getBackgroundIndex() const
Gets the window background color when in color index mode.
virtual void setMPEGRecorder(SoMPEGRenderer *recorder)
Sets the recorder used for MPEG encoding.
void redrawOnSelectionChange(SoSelection *s)
Call this convenience method to have this render area redraw whenever the selection list changes in t...
const SbGLShareContext getShareContext()
Returns the information needed to make OpenGL render contexts share OpenGL objects,...
const SbViewportRegion & getViewportRegion() const
Gets current viewport region to use for rendering.
void setColorMap(int startIndex, int num, const SbColor *colors)
Sets the colors to use when displaying in color index mode.
static SbBool isFloatingColorBufferSupported()
Returns TRUE if floating point rendering is available.
unsigned long getRedrawPriority() const
Gets the priority of the redraw sensor.
SoSceneManager * getSceneManager() const
Gets the normal scene manager.
void getFloatingColorBuffer(SbBool &enable, FloatColorBufferSize &size)
Returns TRUE if floating point rendering is used and its precision.
SoWinRenderArea(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 device...
void setPostRenderCallback(SoWinRenderAreaRenderCB *fcn, void *userData=NULL)
Specifies a function to be called after the Open Inventor render traversal and immediately before the...
virtual void setSceneGraph(SoNode *newScene)
Sets the scene graph to be rendered in this component's window.
void setRedrawPriority(unsigned long priority)
Sets the priority of the redraw sensor.
void render()
Calling this forces the render area to be redrawn now.
void setTransparencyType(SoGLRenderAction::TransparencyType type)
Sets the algorithm for rendering transparent objects.
SoGLRenderAction::InvalidateCacheMode getInvalidateCacheMode()
Returns the current cache invalidation mode.
void setBackgroundIndex(int index)
Sets the window background color when in color index mode.
SoWinRenderAreaRenderCB * getPostRenderCallback(const void *&userData) const
Gets the post-render callback function and data.
~SoWinRenderArea()
Destructor.
SbColor getBackgroundColor() const
Gets the background color for this window.
void setClearBeforeRender(SbBool trueOrFalse, SbBool zbTrueOrFalse=TRUE)
Enables/prevents window clearing from happening before a rendering starts (default is clear TRUE).
void setFloatingColorBuffer(SbBool enable, FloatColorBufferSize size=FLOAT_16_COLOR_BUFFER)
Enables/disables floating point rendering using 16- or 32-bit components.
void setAutoRedraw(SbBool trueOrFalse)
The render area will automatically redraw whenever something in the scene graph changes.
void sendEvent(XAnyEvent *anEvent)
Sends the event to be processed by the renderArea.
SbBool isClearZBufferBeforeRender() const
Queries whether the depth buffer (sometimes called the Z buffer) will be cleared before rendering sta...
SbBool isClearBeforeRender() const
Queries whether the window will be cleared before rendering starts.
void registerDevice(SoWinDevice *d)
Registers interest in devices.
void scheduleRedraw()
Schedules a redraw to happen sometime soon (as opposed to immediately).
void unregisterDevice(SoWinDevice *d)
Unregisters interest in devices.
SoGLRenderAction::TransparencyType getTransparencyType() const
Gets the algorithm for rendering transparent objects.
static unsigned long getDefaultRedrawPriority()
Gets the default priority number of the redraw sensor.
SbBool isAutoRedraw() const
Queries whether the render area will automatically redraw whenever something in the scene graph chang...
void setFastEditSavePolicy(SoGLRenderAction::FastEditSavePolicy policy, SbBool fastEditDelayedObjects=FALSE)
Sets fast editing save policy to use when rendering.
virtual SoNode * getSceneGraph()
Gets the scene graph to be rendered in this component's window.
virtual SoMPEGRenderer * getMPEGRecorder() const
Returns the recorder used for MPEG encoding.
void setViewportRegion(const SbViewportRegion &newRegion)
Sets viewport region to use for rendering.
SbBool SoWinRenderAreaRenderCB(void *userData, SoWinRenderArea *rendArea)
SoGLRenderAction::FastEditSavePolicy getFastEditSavePolicy() const
Returns fast editing save policy used when rendering.
void setGLRenderAction(SoGLRenderAction *ra)
Sets the GL render action to use.
void setBackgroundColor(const SbColor &c)
Sets the background color for this window.
SbBool SoWinRenderAreaEventCB(void *userData, XAnyEvent *anyevent)
void setEventCallback(SoWinRenderAreaEventCB *fcn, void *userData=NULL)
Windows messages which occur in the render area window are either directly handled by the viewer (whe...
SoGLRenderAction * getGLRenderAction() const
Gets the current GL render action.
void setInvalidateCacheMode(SoGLRenderAction::InvalidateCacheMode icm)
Enables or disables the invalidation of render caches.