Gamp v0.0.7-36-g24b1eb6
Gamp: Graphics, Audio, Multimedia and Processing
|
Specifies a set of OpenGL capabilities. More...
#include <GLCapabilities.hpp>
Public Member Functions | |
constexpr | GLCapabilities () noexcept=default |
constexpr | GLCapabilities (const GLCapabilities &) noexcept=default |
constexpr | GLCapabilities (GLCapabilities &&) noexcept=default |
constexpr int | accumAlphaBits () const noexcept |
Returns the number of bits for the accumulation buffer's alpha component. | |
constexpr int & | accumAlphaBits () noexcept |
Sets number of bits requested for accumulation buffer's alpha component. | |
constexpr int | accumBlueBits () const noexcept |
Returns the number of bits for the accumulation buffer's blue component. | |
constexpr int & | accumBlueBits () noexcept |
Sets the number of bits requested for the accumulation buffer's blue component. | |
constexpr int | accumGreenBits () const noexcept |
Returns the number of bits for the accumulation buffer's green component. | |
constexpr int & | accumGreenBits () noexcept |
Sets the number of bits requested for the accumulation buffer's green component. | |
constexpr int | accumRedBits () const noexcept |
Returns the number of bits for the accumulation buffer's red component. | |
constexpr int & | accumRedBits () noexcept |
Sets the number of bits requested for the accumulation buffer's red component. | |
CapabilitiesPtr | clone () const noexcept override |
int | compare (const Capabilities &rhs0) const noexcept override |
comparing hw/sw, stereo, multisample, stencil, RGBA and depth only | |
constexpr int | depthBits () const noexcept |
Returns the number of depth buffer bits. | |
constexpr int & | depthBits () noexcept |
Sets the number of bits requested for the depth buffer. | |
constexpr bool | doubleBuffered () const noexcept |
Returns whether double-buffering is requested, available or chosen. | |
constexpr bool | hardwareAccelerated () const noexcept |
Returns whether hardware acceleration is requested, available or chosen. | |
std::size_t | hash_code () const noexcept override |
constexpr bool | hasSamples () const noexcept |
Sets the desired extension for full-scene antialiasing (FSAA), default is DEFAULT_SAMPLE_EXTENSION . | |
constexpr bool | isFBO () const noexcept |
Returns whether FBO offscreen mode is requested, available or chosen. | |
GLCapabilities & | operator= (const GLCapabilities &) noexcept=default |
bool | operator== (const Capabilities &rhs0) const noexcept override |
constexpr int | samplesCount () const noexcept |
Returns the number of sample buffers to be allocated if sample buffers are enabled, otherwise returns 0. | |
constexpr int & | samplesCount () noexcept |
If sample buffers are enabled, indicates the number of buffers to be allocated. | |
constexpr void | setDoubleBuffered (bool enable) noexcept |
Enables or disables double buffering. | |
constexpr void | setFBO (bool enable) noexcept |
Requesting offscreen FBO mode. | |
constexpr void | setHardwareAccelerated (bool enable) noexcept |
Enables or disables hardware acceleration. | |
constexpr void | setHasSamples (bool enable) noexcept |
Defaults to false. | |
constexpr void | setStereo (bool enable) noexcept |
Enables or disables stereo viewing. | |
const jau::type_info & | signature () const noexcept override |
constexpr int | stencilBits () const noexcept |
Returns the number of stencil buffer bits. | |
constexpr int & | stencilBits () noexcept |
Sets the number of bits requested for the stencil buffer. | |
constexpr bool | stereo () const noexcept |
Returns whether stereo is requested, available or chosen. | |
std::string | toString () const override |
Returns a textual representation of this GLCapabilities object. | |
![]() | |
constexpr | Capabilities () noexcept=default |
Creates a Capabilities object. | |
constexpr | Capabilities (Capabilities &&) noexcept=default |
constexpr | Capabilities (const Capabilities &) noexcept=default |
virtual | ~Capabilities () noexcept=default |
constexpr int | alphaBits () const noexcept |
Returns the number of bits for the color buffer's alpha component. | |
constexpr int & | alphaBits () noexcept |
Allows setting the number of bits requested for the color buffer's alpha component. | |
constexpr int | blueBits () const noexcept |
Returns the number of bits for the color buffer's blue component. | |
constexpr int & | blueBits () noexcept |
Allows setting the number of bits requested for the color buffer's blue component. | |
constexpr int | greenBits () const noexcept |
Returns the number of bits for the color buffer's green component. | |
constexpr int & | greenBits () noexcept |
Allows setting the number of bits requested for the color buffer's green component. | |
constexpr bool | isBackgroundOpaque () const noexcept |
Returns whether an opaque or translucent surface is requested, supported or chosen. | |
constexpr bool | isBitmap () const noexcept |
Returns whether bitmap offscreen mode is requested, available or chosen. | |
constexpr bool | isOnscreen () const noexcept |
Returns whether an on- or offscreen surface is requested, available or chosen. | |
std::strong_ordering | operator<=> (const Capabilities &rhs) const noexcept |
Capabilities & | operator= (const Capabilities &) noexcept=default |
constexpr int | redBits () const noexcept |
Returns the number of bits for the color buffer's red component. | |
constexpr int & | redBits () noexcept |
Allows setting the number of bits requested for the color buffer's red component. | |
constexpr void | setBackgroundOpaque (bool opaque) noexcept |
Sets whether the surface shall be opaque or translucent. | |
constexpr void | setBitmap (bool enable) noexcept |
Requesting offscreen bitmap mode. | |
constexpr void | setOnscreen (bool v) noexcept |
Sets whether the surface shall be on- or offscreen. | |
constexpr int | transparentAlphaValue () const noexcept |
Gets the transparent alpha value for the frame buffer configuration. | |
constexpr int & | transparentAlphaValue () noexcept |
Allows setting the transparent alpha value for the frame buffer configuration, ranging from 0 to the maximum frame buffer value for alpha. | |
constexpr int | transparentBlueValue () const noexcept |
Gets the transparent blue value for the frame buffer configuration. | |
constexpr int & | transparentBlueValue () noexcept |
Allows setting the transparent blue value for the frame buffer configuration, ranging from 0 to the maximum frame buffer value for blue. | |
constexpr int | transparentGreenValue () const noexcept |
Gets the transparent green value for the frame buffer configuration. | |
constexpr int & | transparentGreenValue () noexcept |
Allows setting the transparent green value for the frame buffer configuration, ranging from 0 to the maximum frame buffer value for green. | |
constexpr int | transparentRedValue () const noexcept |
Gets the transparent red value for the frame buffer configuration. | |
constexpr int & | transparentRedValue () noexcept |
Allows setting the transparent red value for the frame buffer configuration, ranging from 0 to the maximum frame buffer value for red. | |
constexpr int | visualID () const noexcept |
constexpr int & | visualID () noexcept |
Protected Member Functions | |
std::string | toString (std::string &sink) const |
![]() | |
void | toString (std::string &sink, bool withOnOffScreen) const |
Additional Inherited Members | |
![]() | |
static constexpr std::string_view | CSEP = ", " |
Component separator. | |
static constexpr std::string_view | ESEP = "/" |
Element separator. | |
static constexpr std::string_view | na_str = "----" |
Specifies a set of OpenGL capabilities.
At creation time of a GLDrawable
using GLDrawableFactory
, an instance of this class is passed, describing the desired capabilities that a rendering context must support, such as the OpenGL profile, color depth and whether stereo is enabled.
The actual capabilites of created GLDrawable
s are then reflected by their own GLCapabilites instance, which can be queried with GLDrawable#getChosenGLCapabilities()
.
It currently contains the minimal number of routines which allow configuration on all supported window systems.
Definition at line 39 of file GLCapabilities.hpp.
|
constexprdefaultnoexcept |
|
constexprdefaultnoexcept |
|
constexprdefaultnoexcept |
|
defaultnoexcept |
|
inlineoverridevirtualnoexcept |
Reimplemented from gamp::wt::Capabilities.
Definition at line 63 of file GLCapabilities.hpp.
|
inlineoverridevirtualnoexcept |
Reimplemented from gamp::wt::Capabilities.
Definition at line 65 of file GLCapabilities.hpp.
|
inlineoverridevirtualnoexcept |
Reimplemented from gamp::wt::Capabilities.
Definition at line 67 of file GLCapabilities.hpp.
|
inlineoverridevirtualnoexcept |
Reimplemented from gamp::wt::Capabilities.
Definition at line 86 of file GLCapabilities.hpp.
|
inlineoverridevirtualnoexcept |
comparing hw/sw, stereo, multisample, stencil, RGBA and depth only
Reimplemented from gamp::wt::Capabilities.
Definition at line 116 of file GLCapabilities.hpp.
|
inlineconstexprnoexcept |
Returns whether FBO offscreen mode is requested, available or chosen.
Default is false.
For chosen capabilities, only the selected offscreen surface is set to true
.
Definition at line 181 of file GLCapabilities.hpp.
|
inlineconstexprnoexcept |
Requesting offscreen FBO mode.
If enabled this method also invokes setOnscreen(false)
.
Defaults to false.
Requesting offscreen FBO mode disables the offscreen auto selection.
Definition at line 195 of file GLCapabilities.hpp.
|
inlineconstexprnoexcept |
Returns whether double-buffering is requested, available or chosen.
Default is true.
Definition at line 208 of file GLCapabilities.hpp.
|
inlineconstexprnoexcept |
Enables or disables double buffering.
Definition at line 211 of file GLCapabilities.hpp.
|
inlineconstexprnoexcept |
Returns whether stereo is requested, available or chosen.
Default is false.
Definition at line 219 of file GLCapabilities.hpp.
|
inlineconstexprnoexcept |
Enables or disables stereo viewing.
Definition at line 222 of file GLCapabilities.hpp.
|
inlineconstexprnoexcept |
Returns whether hardware acceleration is requested, available or chosen.
Default is true.
Definition at line 230 of file GLCapabilities.hpp.
|
inlineconstexprnoexcept |
Enables or disables hardware acceleration.
Definition at line 233 of file GLCapabilities.hpp.
|
inlineconstexprnoexcept |
Returns the number of depth buffer bits.
Definition at line 238 of file GLCapabilities.hpp.
|
inlineconstexprnoexcept |
Sets the number of bits requested for the depth buffer.
Definition at line 241 of file GLCapabilities.hpp.
|
inlineconstexprnoexcept |
Returns the number of stencil buffer bits.
Default is 0.
Definition at line 249 of file GLCapabilities.hpp.
|
inlineconstexprnoexcept |
Sets the number of bits requested for the stencil buffer.
Definition at line 252 of file GLCapabilities.hpp.
|
inlineconstexprnoexcept |
Returns the number of bits for the accumulation buffer's red component.
On some systems only the accumulation buffer depth, which is the sum of the red, green, and blue bits, is considered.
Definition at line 260 of file GLCapabilities.hpp.
|
inlineconstexprnoexcept |
Sets the number of bits requested for the accumulation buffer's red component.
On some systems only the accumulation buffer depth, which is the sum of the red, green, and blue bits, is considered.
Definition at line 266 of file GLCapabilities.hpp.
|
inlineconstexprnoexcept |
Returns the number of bits for the accumulation buffer's green component.
On some systems only the accumulation buffer depth, which is the sum of the red, green, and blue bits, is considered.
Definition at line 274 of file GLCapabilities.hpp.
|
inlineconstexprnoexcept |
Sets the number of bits requested for the accumulation buffer's green component.
On some systems only the accumulation buffer depth, which is the sum of the red, green, and blue bits, is considered.
Definition at line 280 of file GLCapabilities.hpp.
|
inlineconstexprnoexcept |
Returns the number of bits for the accumulation buffer's blue component.
On some systems only the accumulation buffer depth, which is the sum of the red, green, and blue bits, is considered.
Definition at line 288 of file GLCapabilities.hpp.
|
inlineconstexprnoexcept |
Sets the number of bits requested for the accumulation buffer's blue component.
On some systems only the accumulation buffer depth, which is the sum of the red, green, and blue bits, is considered.
Definition at line 294 of file GLCapabilities.hpp.
|
inlineconstexprnoexcept |
Returns the number of bits for the accumulation buffer's alpha component.
On some systems only the accumulation buffer depth, which is the sum of the red, green, and blue bits, is considered.
Definition at line 302 of file GLCapabilities.hpp.
|
inlineconstexprnoexcept |
Sets number of bits requested for accumulation buffer's alpha component.
On some systems only the accumulation buffer depth, which is the sum of the red, green, and blue bits, is considered.
Definition at line 308 of file GLCapabilities.hpp.
|
inlineconstexprnoexcept |
Sets the desired extension for full-scene antialiasing (FSAA), default is DEFAULT_SAMPLE_EXTENSION
.
Returns the extension for full-scene antialiasing (FSAA).
Default is DEFAULT_SAMPLE_EXTENSION
.
Returns whether sample buffers for full-scene antialiasing (FSAA) should be allocated for this drawable.
Default is false.
Definition at line 331 of file GLCapabilities.hpp.
|
inlineconstexprnoexcept |
Defaults to false.
Indicates whether sample buffers for full-scene antialiasing (FSAA) should be allocated for this drawable.
Mind that this requires the alpha component.
If enabled this method also invokes setAlphaBits(1)
if getAlphaBits()
== 0.
Definition at line 341 of file GLCapabilities.hpp.
|
inlineconstexprnoexcept |
Returns the number of sample buffers to be allocated if sample buffers are enabled, otherwise returns 0.
Default is 0 due to disable sample buffers per default.
Definition at line 355 of file GLCapabilities.hpp.
|
inlineconstexprnoexcept |
If sample buffers are enabled, indicates the number of buffers to be allocated.
Defaults to 2.
Definition at line 362 of file GLCapabilities.hpp.
|
inlineoverridevirtual |
Returns a textual representation of this GLCapabilities object.
Reimplemented from gamp::wt::Capabilities.
Definition at line 366 of file GLCapabilities.hpp.
|
inlineprotected |
Definition at line 374 of file GLCapabilities.hpp.