| 1 |
NAME SoXtGLWidget "" "" { |
| 2 |
wrapper around GLwMDraw for OpenGL rendering in a motif widget |
| 3 |
} |
| 4 |
|
| 5 |
INCLUDE Xt/SoXtGLWidget.h |
| 6 |
|
| 7 |
DESC { |
| 8 |
This abstract base class provides a \+C++\.\-C\. wrapper around the |
| 9 |
\xGLwMDraw\. |
| 10 |
widget. It allows OpenGL rendering to be performed within a motif widget and |
| 11 |
is used by the |
| 12 |
\cSoXtRenderArea\.. |
| 13 |
\cSoXtGlWidget\. |
| 14 |
uses a form widget around two separate |
| 15 |
\xGLwMDraw\. |
| 16 |
widgets (one for single and one for double |
| 17 |
buffering), with routines to return the appropriate windows. |
| 18 |
|
| 19 |
\+\p |
| 20 |
Subclasses only need to redefine the |
| 21 |
\mredraw()\. |
| 22 |
routine for rendering and |
| 23 |
\mprocessEvent()\. |
| 24 |
routine if they are interested in receiving X events. |
| 25 |
\. |
| 26 |
} |
| 27 |
|
| 28 |
METHOD "" void setBorder(SbBool onOrOff) {} |
| 29 |
METHOD "" SbBool isBorder() const { |
| 30 |
Show and hide the border around the glx widgets (thickness 3). |
| 31 |
Default is no border (FALSE). |
| 32 |
(The \cSoXtRenderArea\. subclass defaults turns the border on by default.) |
| 33 |
} |
| 34 |
|
| 35 |
METHOD setDblBuf virtual void setDoubleBuffer(SbBool onOrOff) {} |
| 36 |
METHOD isDblBuf SbBool isDoubleBuffer() |
| 37 |
{ |
| 38 |
Routine which dynamically changes between single and |
| 39 |
double buffering. |
| 40 |
Default is double buffer off. (The |
| 41 |
\cSoXtRenderArea\. |
| 42 |
subclass makes it double buffer by default.) |
| 43 |
} |
| 44 |
|
| 45 |
METHOD getNormWin Window getNormalWindow() {} |
| 46 |
METHOD getOverWin Window getOverlayWindow() {} |
| 47 |
METHOD getNormCtx GLXContext getNormalContext() {} |
| 48 |
METHOD getOverCtx GLXContext getOverlayContext() {} |
| 49 |
METHOD getNormWidget Widget getNormalWidget() {} |
| 50 |
METHOD getOverWidget Widget getOverlayWidget() |
| 51 |
{ |
| 52 |
Get the current normal and overlay GLX windows, contexes and widgets, |
| 53 |
which are needed as arguments to glXMakeCurrent() when doing |
| 54 |
drawing in the normal or overlay planes. |
| 55 |
|
| 56 |
\p |
| 57 |
Note: These should \enot\. be cached by users because they will |
| 58 |
change as single/double buffering changes. |
| 59 |
} |
| 60 |
|
| 61 |
METHOD setNormVis virtual void setNormalVisual(XVisualInfo *vis) {} |
| 62 |
METHOD getNormVis XVisualInfo * getNormalVisual() {} |
| 63 |
METHOD setOverVis virtual void setOverlayVisual(XVisualInfo *vis) {} |
| 64 |
METHOD getOverVis XVisualInfo * getOverlayVisual() |
| 65 |
{ |
| 66 |
Specify exactly what the visual should be for the normal and overlay |
| 67 |
window. This allows the user to create all possible visuals supported |
| 68 |
by OpenGL. The \xXVisualInfo\. structure should be a valid OpenGL visual |
| 69 |
returned by \xglXChooseVisual()\.. This structure will be copied by |
| 70 |
the \cSoXtGLWidget\.; the application is responsible for freeing |
| 71 |
the visual info with \xXFree()\. when done. |
| 72 |
\+(The methods for setting the visual are virtual so that |
| 73 |
derived classes can know when the visual is changing.)\. |
| 74 |
} |
| 75 |
|
| 76 |
METHOD setDrwFrontBuf void setDrawToFrontBufferEnable(SbBool enableFlag) {} |
| 77 |
METHOD isDrwFrontBuf SbBool isDrawToFrontBufferEnable() const |
| 78 |
{ |
| 79 |
Inventor 2.1 changed the behavior of double buffered windows to |
| 80 |
redraw temporary to the front buffer when an expose event is received |
| 81 |
or when a new sceneGraph() is set on an SoXtRenderArea. This does not |
| 82 |
apply for general interactive rendering. The idea is that it is |
| 83 |
better to see something redraw (especially if it is slow) than |
| 84 |
to see garbage in the window (in the expose case) or an old invalid |
| 85 |
scene graph (in the SoXtRenderArea::setSceneGraph() case). |
| 86 |
\p |
| 87 |
This API enables you to turn this functionality OFF if for some reason |
| 88 |
you are unable to prevent repeated expose from causing a redraw (which |
| 89 |
is bad and should be fixed, as it gets worse for large scenes). |
| 90 |
This will be the case for example if you can't create a pulldown |
| 91 |
menu in the popup planes. |
| 92 |
\p |
| 93 |
NOTE: this api might be removed in some future releases and is only |
| 94 |
intended as a porting help for Inventor 2.0 to 2.1 |
| 95 |
} |
| 96 |
|
| 97 |
ALSO { SoXtComponent, SoXtRenderArea } |