SoGLGraphicDevice Class Reference
[General]

VSG extension Represents an OpenGL graphics device. More...

#include <Inventor/components/SoGLGraphicDevice.h>

Inheritance diagram for SoGLGraphicDevice:
SoGraphicDevice

List of all members.

Public Types

enum  DeviceType {
  WINDOW = 0,
  PBUFFER,
  BITMAP
}

Public Member Functions

 SoGLGraphicDevice (SbGlContextHelper::Display display, DeviceType dt=SoGLGraphicDevice::WINDOW)
virtual ~SoGLGraphicDevice ()
SoGLGraphicDeviceoperator() (SbGlContextHelper::Display display)
SoGraphicConfiggetBestGraphicConfig (const SoGraphicConfigTemplate &temp)
SoGraphicConfiggetDefaultGraphicConfig ()
SoGLGraphicConfigTemplate getGraphicConfigTemplate (SoGLGraphicConfig *graphicConfig)
size_t getNum ()
SoGraphicConfiggetGraphicConfig (size_t n)
size_t getNum (const SoGraphicConfigTemplate &temp)
SoGraphicConfiggetGraphicConfig (const SoGraphicConfigTemplate &temp, size_t n)
SbGlContextHelper::Display getDisplay ()

Detailed Description

VSG extension Represents an OpenGL graphics device.

This class is an encapsulation of a real graphics device for OpenGL. It could be:

This class provides convenience methods to get the system-dependent identifier, i.e., the HDC or the Display *. It provides methods to query the supported OpenGL graphics configurations and to sort them according to the preferences specified in a graphics template.

SEE ALSO

SoGraphicConfigTemplate, SoGLGraphicConfigTemplate, SoGraphicConfig, SoGraphicDevice, SoGLGraphicDevice.

See related examples:

GraphicConfig


Member Enumeration Documentation

Device types.

Enumerator:
WINDOW 

Window.

PBUFFER 

PBuffer.

BITMAP 

Bitmap.


Constructor & Destructor Documentation

SoGLGraphicDevice::SoGLGraphicDevice ( SbGlContextHelper::Display  display,
DeviceType  dt = SoGLGraphicDevice::WINDOW 
)

Constructor.

virtual SoGLGraphicDevice::~SoGLGraphicDevice (  )  [virtual]

Destructor.


Member Function Documentation

SoGraphicConfig* SoGLGraphicDevice::getBestGraphicConfig ( const SoGraphicConfigTemplate temp  )  [virtual]

Returns the best graphics configuration corresponding to the preferences in the specified template.

Implements SoGraphicDevice.

SoGraphicConfig* SoGLGraphicDevice::getDefaultGraphicConfig (  )  [virtual]

Returns the best graphics configuration corresponding to a graphics template containing the default preferences (see SoGLGraphicConfigTemplate).

Implements SoGraphicDevice.

SbGlContextHelper::Display SoGLGraphicDevice::getDisplay (  ) 

Returns the Display corresponding to this graphics device.

SoGraphicConfig* SoGLGraphicDevice::getGraphicConfig ( const SoGraphicConfigTemplate temp,
size_t  n 
) [virtual]

Returns the best nth of all the graphics configurations supported by this device and sorted according to the given template.

Implements SoGraphicDevice.

SoGraphicConfig* SoGLGraphicDevice::getGraphicConfig ( size_t  n  )  [virtual]

Returns the n-th of all the graphics configurations supported by this device.

Implements SoGraphicDevice.

SoGLGraphicConfigTemplate SoGLGraphicDevice::getGraphicConfigTemplate ( SoGLGraphicConfig graphicConfig  ) 

Returns a template corresponding to the given graphics configuration.

The returned template, if passed to SoGLGraphicDevice::getBestGraphicConfig, would return the originally specified (or a functionally equivalent) graphicConfig as the best graphic configuration.

For example, if graphicConfig supports an accumulation buffer and its R/G/B/A sizes are respectively 24,24,24,16, then the returned template is set as if you had called:

   temp.setAccum(SoGraphicConfigTemplate::REQUIRED, 24, 24, 24, 16, 24, 24, 24, 16);

If graphicConfig does not support an accumulation buffer, then the returned template is set as if you had called:

   temp.setAccum(SoGraphicConfigTemplate::REQUIRED, 0, 0, 0, 0, 0, 0, 0, 0);

It is not guaranteed that the template returned by this method will select exactly the same graphics configuration as was passed to this method. However, it will select a graphics configuration with the same OpenGL capabilities and values.

size_t SoGLGraphicDevice::getNum ( const SoGraphicConfigTemplate temp  )  [virtual]

Returns the number of the graphics configurations supported by this device and the given template.

Implements SoGraphicDevice.

size_t SoGLGraphicDevice::getNum (  )  [virtual]

Returns the number of the graphics configurations supported by this device.

Implements SoGraphicDevice.

SoGLGraphicDevice& SoGLGraphicDevice::operator() ( SbGlContextHelper::Display  display  ) 

Allows you to cast Display to SoGLGraphicDevice.


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

Open Inventor Toolkit reference manual, generated on 15 Mar 2023
Copyright © Thermo Fisher Scientific All rights reserved.
http://www.openinventor.com/