SoXtMPGLWidget Class Reference

Component for OpenGL rendering. More...

#include <Inventor/MP/Xt/SoXtMPGLWidget.h>

Inheritance diagram for SoXtMPGLWidget:
SoXtComponent SoXtMPRenderArea SoXtMPViewer SoXtMPFullViewer SoXtMPConstrainedViewer SoXtMPExaminerViewer SoXtMPPlaneViewer SoXtMPFlyViewer SoXtMPWalkViewer

List of all members.

Public Member Functions

int getColorMapSize ()
virtual Window getNormalWindow ()
SoGLContextgetNormalContext ()
SoWidget getNormalWidget ()
virtual void setNormalVisual (XVisualInfo *vis)
XVisualInfo * getNormalVisual ()
virtual void setDoubleBuffer (SbBool onOrOff)
SbBool isDoubleBuffer ()
void setBorder (SbBool onOrOff)
SbBool isBorder () const
void setDrawToFrontBufferEnable (SbBool enableFlag)
SbBool isDrawToFrontBufferEnable () const
SbVec2s getVirtualSize (void)
SbVec2s winToDC (int x, int y, Window w=NULL) const
SbVec2f DCtoNDC (SbVec2s pos, Window w=NULL) const

Detailed Description

Component for OpenGL rendering.

This abstract base class provides a C++ wrapper around the GLwMDraw window object. It allows OpenGL rendering to be performed within a Motif window and is used by the SoXtMPRenderArea. SoXtMPGLWidget uses a parent window with two separate GLwMDraw window objects (one for single and one for double buffering), with routines to return the appropriate windows.

Subclasses only need to redefine the redraw() routine for rendering and processEvent() routine if they are interested in receiving X events.

NOTE: This class does not exist in Open Inventor 10.0 and later.

SEE ALSO

SoXtComponent, SoXtMPRenderArea


Member Function Documentation

SbVec2f SoXtMPGLWidget::DCtoNDC ( SbVec2s  pos,
Window  w = NULL 
) const

Convert a point in Open Inventor device coordinates (same as OpenGL - pixels with Y increasing up) to normalized device coordinates (0..1).

The Window parameter is not required (may be NULL) unless using "InsideOut" mode. In this case it is necessary to determine which window's dimensions to use for the conversion.

int SoXtMPGLWidget::getColorMapSize (  ) 
SoGLContext* SoXtMPGLWidget::getNormalContext (  )  [inline]

Gets the current normal context, which is needed as an argument to glXMakeCurrent() when drawing in the normal planes.

Note: This should not be cached by users because it will change as single/double buffering changes.

XVisualInfo* SoXtMPGLWidget::getNormalVisual (  ) 

Returns the visual for the normal window.

SoWidget SoXtMPGLWidget::getNormalWidget (  )  [inline]

Gets the current normal widget, which is needed as an argument to glXMakeCurrent() when drawing in the normal planes.

Note: This should not be cached by users because it will change as single/double buffering changes.

virtual Window SoXtMPGLWidget::getNormalWindow (  )  [virtual]

Gets the current normal GL window, which is needed as an argument to glXMakeCurrent() when drawing in the normal planes.

Note: This should not be cached by users because it will change as single/double buffering changes.

SbVec2s SoXtMPGLWidget::getVirtualSize ( void   )  [inline]

Queries the size of the virtual multipipe window.

SbBool SoXtMPGLWidget::isBorder (  )  const [inline]

Returns whether the border is on or off.

SbBool SoXtMPGLWidget::isDoubleBuffer (  )  [inline]

Returns whether double buffering is on or off.

SbBool SoXtMPGLWidget::isDrawToFrontBufferEnable (  )  const [inline]

Queries drawing to the front buffer.

void SoXtMPGLWidget::setBorder ( SbBool  onOrOff  ) 

Shows and hides the border around the OpenGL windows (thickness 3).

Default is no border (FALSE). (The SoXtMPRenderArea subclass defaults turns the border on by default.)

virtual void SoXtMPGLWidget::setDoubleBuffer ( SbBool  onOrOff  )  [virtual]

Routine that dynamically changes between single and double buffering.

Default is double buffer off. (The SoXtMPRenderArea subclass makes it double buffer by default.)

void SoXtMPGLWidget::setDrawToFrontBufferEnable ( SbBool  enableFlag  ) 

Sets drawing to the front buffer.

Controls drawing to the front buffer when an obscured portion of the window is exposed. Default: TRUE.

virtual void SoXtMPGLWidget::setNormalVisual ( XVisualInfo *  vis  )  [virtual]

Specify exactly what the visual should be for the normal window.

This allows the user to create all possible visual supported by OpenGL. The XVisualInfo structure should be a valid OpenGL visual returned by glXChooseVisual (). This structure will be copied by the SoXtMPGLWidget; the application is responsible for freeing the visual info with XFree () when done. (The methods for setting the visual are virtual so that derived classes can know when the visual is changing.)

SbVec2s SoXtMPGLWidget::winToDC ( int  x,
int  y,
Window  w = NULL 
) const

Convert a point in native window coordinates, typically with Y increasing down, to Open Inventor (and OpenGL) device coordinates with Y increasing up.

The Window parameter is not required (may be NULL) unless using "InsideOut" mode. In this case it is necessary to determine which window's height to use for the conversion.

Typically this method is used to convert the position of a window system event.


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

Open Inventor Toolkit reference manual, generated on 12 Feb 2024
Copyright © Thermo Fisher Scientific All rights reserved.
http://www.openinventor.com/