Open Inventor Release 2024.1.3
 
Loading...
Searching...
No Matches
SoGLGraphicConfigTemplate Class Reference

VSG extension Defines an OpenGL graphics configuration template. More...

#include <Inventor/components/SoGLGraphicConfigTemplate.h>

+ Inheritance diagram for SoGLGraphicConfigTemplate:

Public Member Functions

 SoGLGraphicConfigTemplate ()
 Constructor.
 
virtual ~SoGLGraphicConfigTemplate ()
 Destructor.
 
virtual SbBool isGraphicsConfigSupported (SoGraphicConfig &graphicConfig) const
 Indicates if the graphics configuration graphicConfig fits this template.
 
void setDoubleBuffer (SoGraphicConfigTemplate::Preference pref)
 Sets the double buffer mode preference.
 
SoGraphicConfigTemplate::Preference getDoubleBuffer () const
 Returns the double buffer mode preference.
 
void setStereoBuffer (SoGraphicConfigTemplate::Preference pref)
 Sets the stereo buffer mode preference.
 
SoGraphicConfigTemplate::Preference getStereoBuffer () const
 Returns the stereo buffer preference.
 
void setAccelerated (SoGraphicConfigTemplate::Preference pref)
 Sets the graphics acceleration preference.
 
SoGraphicConfigTemplate::Preference getAccelerated () const
 Returns the graphics acceleration preference.
 
void setDepth (SoGraphicConfigTemplate::Preference pref, int minBits=0, int maxBits=INT_MAX)
 Sets the depth buffer preferences.
 
SoGraphicConfigTemplate::Preference getDepth (int &minBits, int &maxBits) const
 Returns the depth buffer preference and sizes.
 
SbBool isFloatRGBAColor () const
 Returns TRUE if floating point RGBA is used.
 
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)
 Sets the color preferences.
 
SoGraphicConfigTemplate::Preference getRGBAColor (int &minRedBits, int &minGreenBits, int &minBlueBits, int &minAlphaBits, int &maxRedBits, int &maxGreenBits, int &maxBlueBits, int &maxAlphaBits) const
 Returns the color preferences.
 
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)
 Sets the float color preferences.
 
SoGraphicConfigTemplate::Preference getFloatRGBAColor (int &minFloatRedBits, int &minFloatGreenBits, int &minFloatBlueBits, int &minFloatAlphaBits, int &maxFloatRedBits, int &maxFloatGreenBits, int &maxFloatBlueBits, int &maxFloatAlphaBits) const
 Returns the float color preferences.
 
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)
 Sets the accumulation preferences.
 
SoGraphicConfigTemplate::Preference getAccum (int &minRedBits, int &minGreenBits, int &minBlueBits, int &minAlphaBits, int &maxRedBits, int &maxGreenBits, int &maxBlueBits, int &maxAlphaBits) const
 Returns the accumulation buffer preferences.
 
void setStencil (SoGraphicConfigTemplate::Preference pref, int minBits=0, int maxBits=INT_MAX)
 Sets the stencil preferences.
 
SoGraphicConfigTemplate::Preference getStencil (int &minBits, int &maxBits) const
 Returns the stencil preferences.
 
void setFullSceneAntialiasing (SoGraphicConfigTemplate::Preference pref, int minFsaaBits=0, int maxFsaaBits=INT_MAX)
 Sets the full-scene antialiasing preferences.
 
SoGraphicConfigTemplate::Preference getFullSceneAntialiasing (int &minFsaaBits, int &maxFsaaBits) const
 Returns the full-scene antialiasing preference and number of samples.
 
- Public Member Functions inherited from SoGraphicConfigTemplate
 SoGraphicConfigTemplate ()
 Constructor.
 
virtual ~SoGraphicConfigTemplate ()
 Destructor.
 

Additional Inherited Members

- Public Types inherited from SoGraphicConfigTemplate
enum  Preference {
  REQUIRED = INT_MAX ,
  PREFERRED = 16 ,
  FORBIDDEN = 0
}
 Priority requirement. More...
 

Detailed Description

VSG extension Defines an OpenGL graphics configuration template.

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:

  • Double buffer is REQUIRED;
  • Stereo buffer is FORBIDDEN;
  • Accelerated OpenGL is REQUIRED;
  • Depth buffer is REQUIRED; its size is greater than 0;
  • Non-indexed color is REQUIRED; its R/G/B/A sizes are greater than 0;
  • Indexed color is FORBIDDEN;
  • Accumulation buffer is PREFERRED (weight 1); its R/G/B/A sizes are greater than 0;
  • Stencil buffer is PREFERRED(weight 1); its size is greater than 0;
  • Full-scene antialiasing is FORBIDDEN.

SEE ALSO

SoGraphicConfigTemplate, SoGLGraphicConfigTemplate, SoGraphicConfigCompare, SoGLGraphicConfigCompare, SoGraphicConfig, SoGLGraphicConfig, SoGLGraphicDevice, SoFullSceneAntialiasing.

Definition at line 70 of file SoGLGraphicConfigTemplate.h.

Constructor & Destructor Documentation

◆ SoGLGraphicConfigTemplate()

SoGLGraphicConfigTemplate::SoGLGraphicConfigTemplate ( )

Constructor.

◆ ~SoGLGraphicConfigTemplate()

virtual SoGLGraphicConfigTemplate::~SoGLGraphicConfigTemplate ( )
virtual

Destructor.

Member Function Documentation

◆ getAccelerated()

SoGraphicConfigTemplate::Preference SoGLGraphicConfigTemplate::getAccelerated ( ) const

Returns the graphics acceleration preference.

◆ getAccum()

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.

◆ getDepth()

SoGraphicConfigTemplate::Preference SoGLGraphicConfigTemplate::getDepth ( int &  minBits,
int &  maxBits 
) const

Returns the depth buffer preference and sizes.

◆ getDoubleBuffer()

SoGraphicConfigTemplate::Preference SoGLGraphicConfigTemplate::getDoubleBuffer ( ) const

Returns the double buffer mode preference.

◆ getFloatRGBAColor()

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.

◆ getFullSceneAntialiasing()

SoGraphicConfigTemplate::Preference SoGLGraphicConfigTemplate::getFullSceneAntialiasing ( int &  minFsaaBits,
int &  maxFsaaBits 
) const

Returns the full-scene antialiasing preference and number of samples.

◆ getRGBAColor()

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.

◆ getStencil()

SoGraphicConfigTemplate::Preference SoGLGraphicConfigTemplate::getStencil ( int &  minBits,
int &  maxBits 
) const

Returns the stencil preferences.

◆ getStereoBuffer()

SoGraphicConfigTemplate::Preference SoGLGraphicConfigTemplate::getStereoBuffer ( ) const

Returns the stereo buffer preference.

◆ isFloatRGBAColor()

SbBool SoGLGraphicConfigTemplate::isFloatRGBAColor ( ) const

Returns TRUE if floating point RGBA is used.

◆ isGraphicsConfigSupported()

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.

◆ setAccelerated()

void SoGLGraphicConfigTemplate::setAccelerated ( SoGraphicConfigTemplate::Preference  pref)

Sets the graphics acceleration preference.

◆ setAccum()

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.

◆ setDepth()

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.

◆ setDoubleBuffer()

void SoGLGraphicConfigTemplate::setDoubleBuffer ( SoGraphicConfigTemplate::Preference  pref)

Sets the double buffer mode preference.

◆ setFloatRGBAColor()

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.

◆ setFullSceneAntialiasing()

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.

◆ setRGBAColor()

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.

◆ setStencil()

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.

◆ setStereoBuffer()

void SoGLGraphicConfigTemplate::setStereoBuffer ( SoGraphicConfigTemplate::Preference  pref)

Sets the stereo buffer mode preference.


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