1SoXtGLWidget(3IV)()                                        SoXtGLWidget(3IV)()
2
3
4

NAME

6       SoXtGLWidget  — wrapper around GLwMDraw for OpenGL rendering in a motif
7       widget
8

INHERITS FROM

10       SoXtComponent > SoXtGLWidget
11

SYNOPSIS

13       #include <Inventor/Xt/SoXtGLWidget.h>
14
15          Methods from class SoXtGLWidget:
16
17     void                setBorder(SbBool onOrOff)
18     SbBool              isBorder() const
19     virtual void        setDoubleBuffer(SbBool onOrOff)
20     SbBool              isDoubleBuffer()
21     Window              getNormalWindow()
22     Window              getOverlayWindow()
23     GLXContext          getNormalContext()
24     GLXContext          getOverlayContext()
25     Widget              getNormalWidget()
26     Widget              getOverlayWidget()
27     virtual void        setNormalVisual(XVisualInfo *vis)
28     XVisualInfo *       getNormalVisual()
29     virtual void        setOverlayVisual(XVisualInfo *vis)
30     XVisualInfo *       getOverlayVisual()
31     void                setDrawToFrontBufferEnable(SbBool enableFlag)
32     SbBool              isDrawToFrontBufferEnable() const
33
34          Methods from class SoXtComponent:
35
36     virtual void            show()
37     virtual void            hide()
38     SbBool                  isVisible()
39     Widget                  getWidget() const
40     SbBool                  isTopLevelShell() const
41     Widget                  getShellWidget() const
42     Widget                  getParentWidget() const
43     void                    setSize(const SbVec2s &size)
44     SbVec2s                 getSize()
45     Display *               getDisplay()
46     void                    setTitle(const char *newTitle)
47     const char *            getTitle() const
48     void                    setIconTitle(const char *newIconTitle)
49     const char *            getIconTitle() const
50     void                    setWindowCloseCallback(SoXtComponentCB     *func,
51                                  void *data = NULL)
52     static SoXtComponent *  getComponent(Widget w)
53     const char *            getWidgetName() const
54     const char *            getClassName() const
55
56

DESCRIPTION

58       This  abstract  base  class  provides a C++ wrapper around the GLwMDraw
59       widget. It allows OpenGL rendering to be performed within a motif  wid‐
60       get  and is used by the SoXtRenderArea. SoXtGlWidget uses a form widget
61       around two separate GLwMDraw widgets (one for single and one for double
62       buffering), with routines to return the appropriate windows.
63
64       Subclasses only need to redefine the redraw() routine for rendering and
65       processEvent() routine if they are interested in receiving X events.
66

METHODS

68     void                setBorder(SbBool onOrOff)
69     SbBool              isBorder() const
70          Show and hide the border  around  the  glx  widgets  (thickness  3).
71          Default  is no border (FALSE). (The SoXtRenderArea subclass defaults
72          turns the border on by default.)
73
74     virtual void        setDoubleBuffer(SbBool onOrOff)
75     SbBool              isDoubleBuffer()
76          Routine which dynamically changes between single and double  buffer‐
77          ing.  Default  is  double  buffer  off. (The SoXtRenderArea subclass
78          makes it double buffer by default.)
79
80     Window              getNormalWindow()
81     Window              getOverlayWindow()
82     GLXContext          getNormalContext()
83     GLXContext          getOverlayContext()
84     Widget              getNormalWidget()
85     Widget              getOverlayWidget()
86          Get the current normal and overlay GLX windows,  contexes  and  wid‐
87          gets,  which  are needed as arguments to glXMakeCurrent() when doing
88          drawing in the normal or overlay planes.
89
90          Note: These should not be cached by users because they  will  change
91          as single/double buffering changes.
92
93     virtual void        setNormalVisual(XVisualInfo *vis)
94     XVisualInfo *       getNormalVisual()
95     virtual void        setOverlayVisual(XVisualInfo *vis)
96     XVisualInfo *       getOverlayVisual()
97          Specify exactly what the visual should be for the normal and overlay
98          window. This allows the user to create  all  possible  visuals  sup‐
99          ported by OpenGL. The XVisualInfo structure should be a valid OpenGL
100          visual returned by glXChooseVisual(). This structure will be  copied
101          by  the SoXtGLWidget; the application is responsible for freeing the
102          visual info with XFree() when done. (The  methods  for  setting  the
103          visual  are virtual so that derived classes can know when the visual
104          is changing.)
105
106     void                setDrawToFrontBufferEnable(SbBool enableFlag)
107     SbBool              isDrawToFrontBufferEnable() const
108          Inventor 2.1 changed the behavior  of  double  buffered  windows  to
109          redraw  temporary  to  the  front  buffer  when  an  expose event is
110          received or when a new sceneGraph() is  set  on  an  SoXtRenderArea.
111          This  does  not apply for general interactive rendering. The idea is
112          that it is better to see something redraw (especially if it is slow)
113          than  to  see  garbage  in the window (in the expose case) or an old
114          invalid scene graph (in the SoXtRenderArea::setSceneGraph() case).
115
116          This API enables you to turn this functionality OFF if for some rea‐
117          son  you are unable to prevent repeated expose from causing a redraw
118          (which is bad and should be  fixed,  as  it  gets  worse  for  large
119          scenes).  This  will  be  the case for example if you can't create a
120          pulldown menu in the popup planes.
121
122          NOTE: this api might be removed in some future releases and is  only
123          intended as a porting help for Inventor 2.0 to 2.1
124
125

SEE ALSO

127       SoXtComponent, SoXtRenderArea
128
129
130
131
132                                                           SoXtGLWidget(3IV)()
Impressum