Defines an OpenGL graphics configuration template. More...
#include <Inventor/components/SoGLGraphicConfigTemplate.h>
Public Member Functions | |
SoGLGraphicConfigTemplate () | |
virtual | ~SoGLGraphicConfigTemplate () |
virtual SbBool | isGraphicsConfigSupported (SoGraphicConfig &graphicConfig) const |
void | setDoubleBuffer (SoGraphicConfigTemplate::Preference pref) |
SoGraphicConfigTemplate::Preference | getDoubleBuffer () const |
void | setStereoBuffer (SoGraphicConfigTemplate::Preference pref) |
SoGraphicConfigTemplate::Preference | getStereoBuffer () const |
void | setAccelerated (SoGraphicConfigTemplate::Preference pref) |
SoGraphicConfigTemplate::Preference | getAccelerated () const |
void | setDepth (SoGraphicConfigTemplate::Preference pref, int minBits=0, int maxBits=INT_MAX) |
SoGraphicConfigTemplate::Preference | getDepth (int &minBits, int &maxBits) const |
SbBool | isFloatRGBAColor () const |
void | setRGBAColor (SoGraphicConfigTemplate::Preference pref, int minRedBits=0, int minGreenBits=0, int minBlueBits=0, int minAlphaBits=0, int maxRedBits=INT_MAX, int maxGreenBits=INT_MAX, int maxBlueBits=INT_MAX, int maxAlphaBits=INT_MAX) |
SoGraphicConfigTemplate::Preference | getRGBAColor (int &minRedBits, int &minGreenBits, int &minBlueBits, int &minAlphaBits, int &maxRedBits, int &maxGreenBits, int &maxBlueBits, int &maxAlphaBits) const |
void | setFloatRGBAColor (SoGraphicConfigTemplate::Preference pref, int minFloatRedBits=15, int minFloatGreenBits=15, int minFloatBlueBits=15, int minFloatAlphaBits=15, int maxFloatRedBits=16, int maxFloatGreenBits=16, int maxFloatBlueBits=16, int maxFloatAlphaBits=16) |
SoGraphicConfigTemplate::Preference | getFloatRGBAColor (int &minFloatRedBits, int &minFloatGreenBits, int &minFloatBlueBits, int &minFloatAlphaBits, int &maxFloatRedBits, int &maxFloatGreenBits, int &maxFloatBlueBits, int &maxFloatAlphaBits) const |
void | setAccum (SoGraphicConfigTemplate::Preference pref, int minRedBits=0, int minGreenBits=0, int minBlueBits=0, int minAlphaBits=0, int maxRedBits=INT_MAX, int maxGreenBits=INT_MAX, int maxBlueBits=INT_MAX, int maxAlphaBits=INT_MAX) |
SoGraphicConfigTemplate::Preference | getAccum (int &minRedBits, int &minGreenBits, int &minBlueBits, int &minAlphaBits, int &maxRedBits, int &maxGreenBits, int &maxBlueBits, int &maxAlphaBits) const |
void | setStencil (SoGraphicConfigTemplate::Preference pref, int minBits=0, int maxBits=INT_MAX) |
SoGraphicConfigTemplate::Preference | getStencil (int &minBits, int &maxBits) const |
void | setFullSceneAntialiasing (SoGraphicConfigTemplate::Preference pref, int minFsaaBits=0, int maxFsaaBits=INT_MAX) |
SoGraphicConfigTemplate::Preference | getFullSceneAntialiasing (int &minFsaaBits, int &maxFsaaBits) const |
An OpenGL graphics configuration template is a set of graphics preferences used to choose the best OpenGL graphics configuration (SoGLGraphicConfig) available on an OpenGL graphics device (SoGLGraphicDevice).
There are many different criteria: double/single buffer, raw stereo, OpenGL acceleration, Z-buffer depth size, RGBA/indexed colors and size, accumulation buffer and size, stencil buffer and size, etc. Every criterion is required, or forbidden, or preferred. The preferred criterion can be extended to an integer weight: SoGraphicConfigTemplate::PREFERRED (equal to 1), 2, 3, 4, 10, 100, 1000, and so forth. The sum of all weights determines if one graphics configuration is better than another.
The default values are:
SoGraphicConfigTemplate, SoGLGraphicConfigTemplate, SoGraphicConfigCompare, SoGLGraphicConfigCompare, SoGraphicConfig, SoGLGraphicConfig, SoGLGraphicDevice, SoFullSceneAntialiasing.
SoGLGraphicConfigTemplate::SoGLGraphicConfigTemplate | ( | ) |
Constructor.
virtual SoGLGraphicConfigTemplate::~SoGLGraphicConfigTemplate | ( | ) | [virtual] |
Destructor.
SoGraphicConfigTemplate::Preference SoGLGraphicConfigTemplate::getAccelerated | ( | ) | const |
Returns the graphics acceleration preference.
SoGraphicConfigTemplate::Preference SoGLGraphicConfigTemplate::getAccum | ( | int & | minRedBits, | |
int & | minGreenBits, | |||
int & | minBlueBits, | |||
int & | minAlphaBits, | |||
int & | maxRedBits, | |||
int & | maxGreenBits, | |||
int & | maxBlueBits, | |||
int & | maxAlphaBits | |||
) | const |
Returns the accumulation buffer preferences.
SoGraphicConfigTemplate::Preference SoGLGraphicConfigTemplate::getDepth | ( | int & | minBits, | |
int & | maxBits | |||
) | const |
Returns the depth buffer preference and sizes.
SoGraphicConfigTemplate::Preference SoGLGraphicConfigTemplate::getDoubleBuffer | ( | ) | const |
Returns the double buffer mode preference.
SoGraphicConfigTemplate::Preference SoGLGraphicConfigTemplate::getFloatRGBAColor | ( | int & | minFloatRedBits, | |
int & | minFloatGreenBits, | |||
int & | minFloatBlueBits, | |||
int & | minFloatAlphaBits, | |||
int & | maxFloatRedBits, | |||
int & | maxFloatGreenBits, | |||
int & | maxFloatBlueBits, | |||
int & | maxFloatAlphaBits | |||
) | const |
Returns the float color preferences.
SoGraphicConfigTemplate::Preference SoGLGraphicConfigTemplate::getFullSceneAntialiasing | ( | int & | minFsaaBits, | |
int & | maxFsaaBits | |||
) | const |
Returns the full-scene antialiasing preference and number of samples.
SoGraphicConfigTemplate::Preference SoGLGraphicConfigTemplate::getRGBAColor | ( | int & | minRedBits, | |
int & | minGreenBits, | |||
int & | minBlueBits, | |||
int & | minAlphaBits, | |||
int & | maxRedBits, | |||
int & | maxGreenBits, | |||
int & | maxBlueBits, | |||
int & | maxAlphaBits | |||
) | const |
Returns the color preferences.
SoGraphicConfigTemplate::Preference SoGLGraphicConfigTemplate::getStencil | ( | int & | minBits, | |
int & | maxBits | |||
) | const |
Returns the stencil preferences.
SoGraphicConfigTemplate::Preference SoGLGraphicConfigTemplate::getStereoBuffer | ( | ) | const |
Returns the stereo buffer preference.
SbBool SoGLGraphicConfigTemplate::isFloatRGBAColor | ( | ) | const |
Returns TRUE if floating point RGBA is used.
virtual SbBool SoGLGraphicConfigTemplate::isGraphicsConfigSupported | ( | SoGraphicConfig & | graphicConfig | ) | const [virtual] |
Indicates if the graphics configuration graphicConfig fits this template.
Returns TRUE if all REQUIRED fields in the template are active in graphicConfig and if all FORBIDDEN fields in the template are inactive in graphicConfig.
Implements SoGraphicConfigTemplate.
void SoGLGraphicConfigTemplate::setAccelerated | ( | SoGraphicConfigTemplate::Preference | pref | ) |
Sets the graphics acceleration preference.
void SoGLGraphicConfigTemplate::setAccum | ( | SoGraphicConfigTemplate::Preference | pref, | |
int | minRedBits = 0 , |
|||
int | minGreenBits = 0 , |
|||
int | minBlueBits = 0 , |
|||
int | minAlphaBits = 0 , |
|||
int | maxRedBits = INT_MAX , |
|||
int | maxGreenBits = INT_MAX , |
|||
int | maxBlueBits = INT_MAX , |
|||
int | maxAlphaBits = INT_MAX | |||
) |
Sets the accumulation preferences.
min(red/green/blue/alpha)Bits and max(red/green/blue/alpha)Bits are the minimum and maximum required sizes. The required size must be greater than or equal to min(red/green/blue/alpha)Bits, and less than or equal to max(red/green/blue/alpha)Bits. The maximum size is always preferred. If pref is FORBIDDEN, the min/max values are ignored.
void SoGLGraphicConfigTemplate::setDepth | ( | SoGraphicConfigTemplate::Preference | pref, | |
int | minBits = 0 , |
|||
int | maxBits = INT_MAX | |||
) |
Sets the depth buffer preferences.
minBits and maxBits are the minimum and maximum required sizes. The required size must be greater than or equal to minBits, and less than or equal to maxBits. The maximum size is always preferred. If pref is FORBIDDEN, the min/max values are ignored.
void SoGLGraphicConfigTemplate::setDoubleBuffer | ( | SoGraphicConfigTemplate::Preference | pref | ) |
Sets the double buffer mode preference.
void SoGLGraphicConfigTemplate::setFloatRGBAColor | ( | SoGraphicConfigTemplate::Preference | pref, | |
int | minFloatRedBits = 15 , |
|||
int | minFloatGreenBits = 15 , |
|||
int | minFloatBlueBits = 15 , |
|||
int | minFloatAlphaBits = 15 , |
|||
int | maxFloatRedBits = 16 , |
|||
int | maxFloatGreenBits = 16 , |
|||
int | maxFloatBlueBits = 16 , |
|||
int | maxFloatAlphaBits = 16 | |||
) |
Sets the float color preferences.
REQUIRED means RGBA mode and FORBIDDEN means indexed color mode. min(red/green/blue/alpha)Bits and max(red/green/blue/alpha)Bits are the minimum and maximum required sizes. The required size must be greater than or equal to the min(red/green/blue/alpha)Bits, and less than or equal to max(red/green/blue/alpha)Bits. The maximum size is always preferred. If pref is FORBIDDEN, the min/max values are ignored.
void SoGLGraphicConfigTemplate::setFullSceneAntialiasing | ( | SoGraphicConfigTemplate::Preference | pref, | |
int | minFsaaBits = 0 , |
|||
int | maxFsaaBits = INT_MAX | |||
) |
Sets the full-scene antialiasing preferences.
Full-scene anti-aliasing by supersampling usually means that each full frame is rendered at double (2x), quadruple (4x), ..., the display resolution, and then down-sampled to match the display resolution. So a 2x FSAA would render four supersampled pixels for each single pixel of each frame. minFsaaBits and maxFsaaBits are integer values specifying the minimum and maximum required number of samples to use during antialiasing computation. The required number of samples must be greater than or equal to minFsaaBits, and less than or equal to maxFsaaBits. The maximum number of samples is always preferred. If pref is FORBIDDEN, the min/max values are ignored.
void SoGLGraphicConfigTemplate::setRGBAColor | ( | SoGraphicConfigTemplate::Preference | pref, | |
int | minRedBits = 0 , |
|||
int | minGreenBits = 0 , |
|||
int | minBlueBits = 0 , |
|||
int | minAlphaBits = 0 , |
|||
int | maxRedBits = INT_MAX , |
|||
int | maxGreenBits = INT_MAX , |
|||
int | maxBlueBits = INT_MAX , |
|||
int | maxAlphaBits = INT_MAX | |||
) |
Sets the color preferences.
REQUIRED means RGBA mode and FORBIDDEN means indexed color mode. min(red/green/blue/alpha)Bits and max(red/green/blue/alpha)Bits are the minimum and maximum required sizes. The required size must be greater than or equal to the min(red/green/blue/alpha)Bits, and less than or equal to max(red/green/blue/alpha)Bits. The maximum size is always preferred. If pref is FORBIDDEN, the min/max values are ignored.
void SoGLGraphicConfigTemplate::setStencil | ( | SoGraphicConfigTemplate::Preference | pref, | |
int | minBits = 0 , |
|||
int | maxBits = INT_MAX | |||
) |
Sets the stencil preferences.
REQUIRED means indexed color mode and FORBIDDEN means RGBA mode. minBits and maxBits are the minimum and maximum required size. The required size must be greater than or equal to minBits, and less than or equal to maxBits. The maximum size is always preferred. If pref is FORBIDDEN, the minBits and maxBits values are ignored.
void SoGLGraphicConfigTemplate::setStereoBuffer | ( | SoGraphicConfigTemplate::Preference | pref | ) |
Sets the stereo buffer mode preference.