SoWxGLWidget Class Reference

#include <Inventor/Wx/SoWxGLWidget.h>

Inheritance diagram for SoWxGLWidget:
SoWxComponent SoWxRenderArea SoWxViewer SoWxFullViewer SoWxExaminerViewer SoWxPlaneViewer

List of all members.

Public Types

enum  FloatColorBufferSize {
  FLOAT_16_COLOR_BUFFER = SoGuiGLWidget::FLOAT_16_COLOR_BUFFER,
  FLOAT_32_COLOR_BUFFER = SoGuiGLWidget::FLOAT_32_COLOR_BUFFER
}

Public Member Functions

int getColorMapSize ()
void setColorMapSize (int size)
virtual wxWindow * getNormalWindow ()
wxGLContext * getNormalContext ()
SoGLContextgetNormalSoContext ()
SoWxGLXgetNormalWidget ()
virtual void setNormalVisual (int *attribList)
int * getNormalVisual ()
virtual void show ()
virtual void hide ()
void setAntialiasing (const float quality, const SoSceneManager::AntialiasingMode mode=SoSceneManager::AUTO)
void setAntialiasing (SoAntialiasingParameters *advancedParameters)
float getAntialiasingQuality () const
SoSceneManager::AntialiasingMode getAntialiasingMode () const
SoAntialiasingParametersgetAntialiasingParameters () const
virtual void setDoubleBuffer (SbBool onOrOff)
SbBool isDoubleBuffer ()
void setBorder (SbBool onOrOff)
int getBorderSize ()
SbBool isBorder () const
void setDrawToFrontBufferEnable (SbBool enableFlag)
SbBool isDrawToFrontBufferEnable () const
virtual SbBool bindNormalContext ()
virtual SbBool unbindNormalContext ()
SbBool swapNormalBuffers ()
void setFloatingColorBuffer (SbBool enable, FloatColorBufferSize size=FLOAT_16_COLOR_BUFFER)
void getFloatingColorBuffer (SbBool &enable, FloatColorBufferSize &size)
bool saveSnapshot (const SbString &filename, bool overwrite=true)

Deprecated



SoDEPRECATED SoWxGLXgetOverlayWidget ()
SoDEPRECATED SbBool isFsaaSupported ()
SoDEPRECATED SbBool isFullSceneAntialiasingHQAvailable () const
SoDEPRECATED SbBool setFullSceneAntialiasingHQ (SbBool enable)
SoDEPRECATED SbBool isFullSceneAntialiasingHQEnabled () const
virtual SoDEPRECATED SbBool makeNormalCurrent ()
SoDEPRECATED SbBool setFullSceneAntialiasing (SbBool enable, float quality=-1.0, int filterMask=SoFullSceneAntialiasing::ALL)
SoDEPRECATED SbBool isFullSceneAntialiasingEnabled () const
SoDEPRECATED SbBool getFullSceneAntialiasing (float &quality)
SoDEPRECATED SbBool isFullSceneAntialiasingAvailable () const

Detailed Description


Member Enumeration Documentation

FloatColorBufferSize.

Enumerator:
FLOAT_16_COLOR_BUFFER 

16-bit rendering per component.

FLOAT_32_COLOR_BUFFER 

32-bit rendering per component.


Member Function Documentation

virtual SbBool SoWxGLWidget::bindNormalContext (  )  [virtual]

Makes the normal rendering context the current context.

Equivalent to makeNormalCurrent() call.

SoSceneManager::AntialiasingMode SoWxGLWidget::getAntialiasingMode (  )  const

Returns the antialiasing mode set using the setAntialiasing(float,AntialiasingMode) method. Returns AUTO by default. Parameters set using the setAntialiasing(SoAntialiasingParameters*) method may change the antialiasing mode, but do not affect the value returned by this method. Therefore this method does not necessarily return the current actual antialiasing mode.

SoAntialiasingParameters* SoWxGLWidget::getAntialiasingParameters (  )  const

Returns the antialiasing parameters set using the setAntialiasing(SoAntialiasingParameters*) method. Returns null by default. A quality value set using the setAntialiasing(float,AntialiasingMode) method may modify internal parameters, but does not affect the value returned by this method. Therefore this method does not necessarily return the current actual antialiasing parameters.

float SoWxGLWidget::getAntialiasingQuality (  )  const

Returns the antialiasing quality set using the setAntialiasing(float,AntialiasingMode) method. Returns 0.0 by default. Parameters set using the setAntialiasing(SoAntialiasingParameters*) method override internal parameters, but do not affect the value returned by this method. Therefore this method does not necessarily return the current actual antialiasing quality.

int SoWxGLWidget::getBorderSize (  )  [inline]

Included for portability only.

int SoWxGLWidget::getColorMapSize (  ) 
void SoWxGLWidget::getFloatingColorBuffer ( SbBool enable,
FloatColorBufferSize size 
)

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

SoDEPRECATED SbBool SoWxGLWidget::getFullSceneAntialiasing ( float &  quality  ) 

Returns TRUE if FSAA is currently enabled.

Also returns the current quality value.

Deprecated:

Deprecated since Open Inventor 9100
Use getAntialiasingMode() or getAntialiasingQuality() to get this information.
wxGLContext* SoWxGLWidget::getNormalContext (  )  [inline]

Gets the current normal context, which is needed as an argument to glXMakeCurrent() (on Xt) or SbGlContextHelper::makeCurrent() (on Windows) when drawing in the normal planes.

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

SoGLContext* SoWxGLWidget::getNormalSoContext (  )  [inline]
int* SoWxGLWidget::getNormalVisual (  ) 

Returns the list of attributes for the normal window.

SoWxGLX* SoWxGLWidget::getNormalWidget (  ) 

Gets the current normal widget.

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

virtual wxWindow* SoWxGLWidget::getNormalWindow (  )  [virtual]

Gets the normal GL window (window system identifier of the widget), which is needed as an argument to glXMakeCurrent() (on Xt) or SbGlContextHelper::makeCurrent() (on Windows) when drawing in the normal planes.

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

SoDEPRECATED SoWxGLX* SoWxGLWidget::getOverlayWidget ( void   )  [inline]

Gets the overlay window handle, which is needed as an argument to SbGlContextHelper::makeCurrent() when drawing in the overlay planes.

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

Note2: Overlay planes are supported only if the graphics board supports overlay planes.

Deprecated:

Deprecated since Open Inventor 9610
Overlay feature is legacy, and no longer makes sense with current hardware.
virtual void SoWxGLWidget::hide (  )  [virtual]

This hides the component.

Reimplemented from SoWxComponent.

Reimplemented in SoWxFullViewer.

SbBool SoWxGLWidget::isBorder (  )  const [inline]

Included for portability only.

SbBool SoWxGLWidget::isDoubleBuffer (  )  [inline]

Returns whether double buffering is on or off.

SbBool SoWxGLWidget::isDrawToFrontBufferEnable (  )  const [inline]

Queries drawing to the front buffer.

SoDEPRECATED SbBool SoWxGLWidget::isFsaaSupported (  ) 

Makes the normal rendering context the current context.

Deprecated:

Deprecated since Open Inventor 8100
Use isFullSceneAntialiasingAvailable() instead.
SoDEPRECATED SbBool SoWxGLWidget::isFullSceneAntialiasingAvailable (  )  const

Returns TRUE if FSAA is supported by current pixel format.

Deprecated:

Deprecated since Open Inventor 9100
See the appropriate subclass of SoGLGraphicConfig.
SoDEPRECATED SbBool SoWxGLWidget::isFullSceneAntialiasingEnabled (  )  const

Use getAntialiasingMode() or getAntialiasingParameters() to get this information.

Returns TRUE, if full-scene antialiasing (FSAA) is enabled.

Deprecated:

Deprecated since Open Inventor 9100
Use getAntialiasingMode() or getAntialiasingParameters() to get this information.
SoDEPRECATED SbBool SoWxGLWidget::isFullSceneAntialiasingHQAvailable (  )  const

Returns TRUE if high quality full-scene antialiasing (FSAA) is available.

This feature requires the GL_MULTISAMPLE_FILTER_HINT_NV extension.

Deprecated:

Deprecated since Open Inventor 8100
See the appropriate subclass of SoGLGraphicConfig, e.g. SoWinGLGraphicConfig.
SoDEPRECATED SbBool SoWxGLWidget::isFullSceneAntialiasingHQEnabled (  )  const

Returns TRUE if the high quality mode for full-scene antialiasing (FSAA) is enabled.

Deprecated:

Deprecated since Open Inventor 8100
Use getAntialiasingParameters() to get this information.
virtual SoDEPRECATED SbBool SoWxGLWidget::makeNormalCurrent (  )  [virtual]

Makes the normal rendering context the current context.

Deprecated:

Deprecated since Open Inventor 8100
Use bindNormalContext and unbindNormalContext instead.
bool SoWxGLWidget::saveSnapshot ( const SbString filename,
bool  overwrite = true 
)

Save a snapshot of the current image displayed in the viewer. The image is read back from the OpenGL framebuffer and will be the same size as the viewer's drawing window. Returns true if successful.Notes:

  • Depending on the operating system and graphics hardware, it is possible that the image could be incomplete if the viewer window is overlapped by other windows.
  • The supported image file formats are: BMP (Windows only), JPEG, PNG and TIFF.
    The image file format to write is determined by the extension of the specified filename, e.g. ".png" for PNG format.
  • For BMP and JPEG formats an RGB image is written.
  • For PNG and TIFF formats, an RGBA (RGB plus alpha channel) image is always written.
  • Writing an RGBA image means the image background is transparent. Actually an RGBA snapshot can not be saved without transparency. To get the displayed image without transparency, use the BMP or the JPEG format.
  • To generate an image with a different size or different options see SoOffscreenRenderer.
  • The specified filename must include a directory or nothing will be written. Can be simply "./filename.png", but just "filename.png" won't work.
Parameters:
filename Fully qualified file path for the snapshot file.
The specified filename must end with one of the extensions supported by SoJPEGImageRW (jpg, jpeg, ...), SoPNGImageRW (png), SoBMPImageRW (bmp), or SoTIFFImageRW (tif, ...).
overwrite If true, overwrite any existing file with the same name (default is true).

void SoWxGLWidget::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:
    advancedParameters Provides specific parameters for an antialiasing mode.
    Use a null parameter to turn off antialiasing or use one of the subclasses of SoAntialiasingParameters.

void SoWxGLWidget::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:
quality The 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.
mode The antialiasing algorithm. Default is AUTO, which means use the best for the current hardware.
Use the value NO_ANTIALIASING to turn off antialiasing.

void SoWxGLWidget::setBorder ( SbBool  onOrOff  ) 

Included for portability only.

void SoWxGLWidget::setColorMapSize ( int  size  ) 
virtual void SoWxGLWidget::setDoubleBuffer ( SbBool  onOrOff  )  [virtual]

Routine that dynamically changes between single and double buffering.

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

void SoWxGLWidget::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.

void SoWxGLWidget::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.

SoDEPRECATED SbBool SoWxGLWidget::setFullSceneAntialiasing ( SbBool  enable,
float  quality = -1.0,
int  filterMask = SoFullSceneAntialiasing::ALL 
)

Enables or disables full-scene antialiasing (FSAA).

Returns TRUE on success.
FSAA is supported via the ARB_multisample OpenGL extension. The ARB_pixel_format OpenGL extension is also required to support this feature.

Note: Use the SoFullSceneAntialiasing node to control FSAA during render traversal.

Parameters:
enable Enables or disables FSAA rendering.
quality Specifies the level of quality of the antialiasing rendering. The number of samples used in the antialiasing computation depends on your graphics hardware and on your video driver. NVidia graphics hardware can support number of samples * 2 levels of quality (assuming the NV_multisample_filter_hint OpenGL extension is available).
The quality value is in the [0..1] interval. 0 is the lowest quality level and 1 is the highest quality level. When set to -1.0 the quality value is the default value for the pixel format.
filterMask Specifies the types of shapes that should be antialiased (See SoFullSceneAntialiasing for more info.)
Deprecated:

Deprecated since Open Inventor 9100
Use setAntialiasing(float,AntialiasingMode) method with mode FSAA or setAntialiasing(SoAntialiasingParameters*) with an SoFullSceneAntialiasingParameters object.
SoDEPRECATED SbBool SoWxGLWidget::setFullSceneAntialiasingHQ ( SbBool  enable  ) 

Enables or disables the high quality mode for full-scene antialiasing (FSAA).

This feature requires the GL_MULTISAMPLE_FILTER_HINT_NV extension.

Deprecated:

Deprecated since Open Inventor 8100
Use setAntialiasing(SoAntialiasingParameters*) method with an SoFullSceneAntialiasingParameters object.
virtual void SoWxGLWidget::setNormalVisual ( int *  attribList  )  [virtual]

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

This allows the user to create all possible visuals supported by OpenGL regarding the features supported by the wxGLCanvas. The attribList structure should be a valid list or attributes supported by wxGLCanvas class. This list will be copied by the SoWxGLWidget; the application is responsible for freeing the list info when done.

The methods for setting the visual are virtual so that derived classes can know when the visual is changing.

virtual void SoWxGLWidget::show (  )  [virtual]

This shows the component.

Reimplemented from SoWxComponent.

SbBool SoWxGLWidget::swapNormalBuffers (  ) 

Swap the normal front and back buffers.

virtual SbBool SoWxGLWidget::unbindNormalContext (  )  [virtual]

Unbind the current context (previously bind with bindNormalContext );.


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

Open Inventor by FEI reference manual, generated on 19 Aug 2019
Copyright © FEI S.A.S. All rights reserved.
http://www.openinventor.com/