Represents an OpenGL graphics device. More...
#include <Inventor/components/SoGLGraphicDevice.h>
Public Types | |
enum | DeviceType { WINDOW = 0 , PBUFFER , BITMAP } |
Device types. More... | |
Public Member Functions | |
SoGLGraphicDevice (SbGlContextHelper::Display display, DeviceType dt=SoGLGraphicDevice::WINDOW) | |
Constructor. | |
virtual | ~SoGLGraphicDevice () |
Destructor. | |
SoGLGraphicDevice & | operator() (SbGlContextHelper::Display display) |
Allows you to cast Display to SoGLGraphicDevice. | |
SoGraphicConfig * | getBestGraphicConfig (const SoGraphicConfigTemplate &temp) |
Returns the best graphics configuration corresponding to the preferences in the specified template. | |
SoGraphicConfig * | getDefaultGraphicConfig () |
Returns the best graphics configuration corresponding to a graphics template containing the default preferences (see SoGLGraphicConfigTemplate). | |
SoGLGraphicConfigTemplate | getGraphicConfigTemplate (SoGLGraphicConfig *graphicConfig) |
Returns a template corresponding to the given graphics configuration. | |
size_t | getNum () |
Returns the number of the graphics configurations supported by this device. | |
SoGraphicConfig * | getGraphicConfig (size_t n) |
Returns the n-th of all the graphics configurations supported by this device. | |
size_t | getNum (const SoGraphicConfigTemplate &temp) |
Returns the number of the graphics configurations supported by this device and the given template. | |
SoGraphicConfig * | getGraphicConfig (const SoGraphicConfigTemplate &temp, size_t n) |
Returns the best nth of all the graphics configurations supported by this device and sorted according to the given template. | |
SbGlContextHelper::Display | getDisplay () |
Returns the Display corresponding to this graphics device. | |
Public Member Functions inherited from SoGraphicDevice | |
virtual | ~SoGraphicDevice () |
Destructor. | |
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.
SoGraphicConfigTemplate, SoGLGraphicConfigTemplate, SoGraphicConfig, SoGraphicDevice, SoGLGraphicDevice.
Definition at line 69 of file SoGLGraphicDevice.h.
Device types.
Enumerator | |
---|---|
WINDOW | Window. |
PBUFFER | PBuffer. |
BITMAP | Bitmap. |
Definition at line 74 of file SoGLGraphicDevice.h.
SoGLGraphicDevice::SoGLGraphicDevice | ( | SbGlContextHelper::Display | display, |
DeviceType | dt = SoGLGraphicDevice::WINDOW |
||
) |
Constructor.
|
virtual |
Destructor.
|
virtual |
Returns the best graphics configuration corresponding to the preferences in the specified template.
Implements SoGraphicDevice.
|
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.
|
virtual |
Returns the best nth of all the graphics configurations supported by this device and sorted according to the given template.
Implements SoGraphicDevice.
|
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:
If graphicConfig does not support an accumulation buffer, then the returned template is set as if you had called:
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.
|
virtual |
Returns the number of the graphics configurations supported by this device.
Implements SoGraphicDevice.
|
virtual |
Returns the number of the graphics configurations supported by this device and the given template.
Implements SoGraphicDevice.
SoGLGraphicDevice & SoGLGraphicDevice::operator() | ( | SbGlContextHelper::Display | display | ) |
Allows you to cast Display to SoGLGraphicDevice.