Gamp v0.0.7-36-g24b1eb6
Gamp: Graphics, Audio, Multimedia and Processing
Loading...
Searching...
No Matches
gamp::render::gl::GLCapabilities Class Reference

Specifies a set of OpenGL capabilities. More...

#include <GLCapabilities.hpp>

Inheritance diagram for gamp::render::gl::GLCapabilities:
Collaboration diagram for gamp::render::gl::GLCapabilities:

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.
 
GLCapabilitiesoperator= (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_infosignature () 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.
 
- Public Member Functions inherited from gamp::wt::Capabilities
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
 
Capabilitiesoperator= (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
 
- Protected Member Functions inherited from gamp::wt::Capabilities
void toString (std::string &sink, bool withOnOffScreen) const
 

Additional Inherited Members

- Static Protected Attributes inherited from gamp::wt::Capabilities
static constexpr std::string_view CSEP = ", "
 Component separator.
 
static constexpr std::string_view ESEP = "/"
 Element separator.
 
static constexpr std::string_view na_str = "----"
 

Detailed Description

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 GLDrawables 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.

Constructor & Destructor Documentation

◆ GLCapabilities() [1/3]

gamp::render::gl::GLCapabilities::GLCapabilities ( )
constexprdefaultnoexcept
Here is the caller graph for this function:

◆ GLCapabilities() [2/3]

gamp::render::gl::GLCapabilities::GLCapabilities ( const GLCapabilities & )
constexprdefaultnoexcept

◆ GLCapabilities() [3/3]

gamp::render::gl::GLCapabilities::GLCapabilities ( GLCapabilities && )
constexprdefaultnoexcept

Member Function Documentation

◆ operator=()

GLCapabilities & gamp::render::gl::GLCapabilities::operator= ( const GLCapabilities & )
defaultnoexcept

◆ signature()

const jau::type_info & gamp::render::gl::GLCapabilities::signature ( ) const
inlineoverridevirtualnoexcept

Reimplemented from gamp::wt::Capabilities.

Definition at line 63 of file GLCapabilities.hpp.

Here is the caller graph for this function:

◆ clone()

CapabilitiesPtr gamp::render::gl::GLCapabilities::clone ( ) const
inlineoverridevirtualnoexcept

Reimplemented from gamp::wt::Capabilities.

Definition at line 65 of file GLCapabilities.hpp.

◆ hash_code()

std::size_t gamp::render::gl::GLCapabilities::hash_code ( ) const
inlineoverridevirtualnoexcept

Reimplemented from gamp::wt::Capabilities.

Definition at line 67 of file GLCapabilities.hpp.

◆ operator==()

bool gamp::render::gl::GLCapabilities::operator== ( const Capabilities & rhs0) const
inlineoverridevirtualnoexcept

Reimplemented from gamp::wt::Capabilities.

Definition at line 86 of file GLCapabilities.hpp.

◆ compare()

int gamp::render::gl::GLCapabilities::compare ( const Capabilities & rhs0) const
inlineoverridevirtualnoexcept

comparing hw/sw, stereo, multisample, stencil, RGBA and depth only

Reimplemented from gamp::wt::Capabilities.

Definition at line 116 of file GLCapabilities.hpp.

◆ isFBO()

bool gamp::render::gl::GLCapabilities::isFBO ( ) const
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.

Here is the caller graph for this function:

◆ setFBO()

void gamp::render::gl::GLCapabilities::setFBO ( bool enable)
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.

◆ doubleBuffered()

bool gamp::render::gl::GLCapabilities::doubleBuffered ( ) const
inlineconstexprnoexcept

Returns whether double-buffering is requested, available or chosen.

Default is true.

Definition at line 208 of file GLCapabilities.hpp.

Here is the caller graph for this function:

◆ setDoubleBuffered()

void gamp::render::gl::GLCapabilities::setDoubleBuffered ( bool enable)
inlineconstexprnoexcept

Enables or disables double buffering.

Definition at line 211 of file GLCapabilities.hpp.

◆ stereo()

bool gamp::render::gl::GLCapabilities::stereo ( ) const
inlineconstexprnoexcept

Returns whether stereo is requested, available or chosen.

Default is false.

Definition at line 219 of file GLCapabilities.hpp.

Here is the caller graph for this function:

◆ setStereo()

void gamp::render::gl::GLCapabilities::setStereo ( bool enable)
inlineconstexprnoexcept

Enables or disables stereo viewing.

Definition at line 222 of file GLCapabilities.hpp.

◆ hardwareAccelerated()

bool gamp::render::gl::GLCapabilities::hardwareAccelerated ( ) const
inlineconstexprnoexcept

Returns whether hardware acceleration is requested, available or chosen.

Default is true.

Definition at line 230 of file GLCapabilities.hpp.

Here is the caller graph for this function:

◆ setHardwareAccelerated()

void gamp::render::gl::GLCapabilities::setHardwareAccelerated ( bool enable)
inlineconstexprnoexcept

Enables or disables hardware acceleration.

Definition at line 233 of file GLCapabilities.hpp.

◆ depthBits() [1/2]

int gamp::render::gl::GLCapabilities::depthBits ( ) const
inlineconstexprnoexcept

Returns the number of depth buffer bits.

Definition at line 238 of file GLCapabilities.hpp.

Here is the caller graph for this function:

◆ depthBits() [2/2]

int & gamp::render::gl::GLCapabilities::depthBits ( )
inlineconstexprnoexcept

Sets the number of bits requested for the depth buffer.

Definition at line 241 of file GLCapabilities.hpp.

◆ stencilBits() [1/2]

int gamp::render::gl::GLCapabilities::stencilBits ( ) const
inlineconstexprnoexcept

Returns the number of stencil buffer bits.

Default is 0.

Definition at line 249 of file GLCapabilities.hpp.

Here is the caller graph for this function:

◆ stencilBits() [2/2]

int & gamp::render::gl::GLCapabilities::stencilBits ( )
inlineconstexprnoexcept

Sets the number of bits requested for the stencil buffer.

Definition at line 252 of file GLCapabilities.hpp.

◆ accumRedBits() [1/2]

int gamp::render::gl::GLCapabilities::accumRedBits ( ) const
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.

Here is the caller graph for this function:

◆ accumRedBits() [2/2]

int & gamp::render::gl::GLCapabilities::accumRedBits ( )
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.

◆ accumGreenBits() [1/2]

int gamp::render::gl::GLCapabilities::accumGreenBits ( ) const
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.

Here is the caller graph for this function:

◆ accumGreenBits() [2/2]

int & gamp::render::gl::GLCapabilities::accumGreenBits ( )
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.

◆ accumBlueBits() [1/2]

int gamp::render::gl::GLCapabilities::accumBlueBits ( ) const
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.

Here is the caller graph for this function:

◆ accumBlueBits() [2/2]

int & gamp::render::gl::GLCapabilities::accumBlueBits ( )
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.

◆ accumAlphaBits() [1/2]

int gamp::render::gl::GLCapabilities::accumAlphaBits ( ) const
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.

Here is the caller graph for this function:

◆ accumAlphaBits() [2/2]

int & gamp::render::gl::GLCapabilities::accumAlphaBits ( )
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.

◆ hasSamples()

bool gamp::render::gl::GLCapabilities::hasSamples ( ) const
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.

Here is the caller graph for this function:

◆ setHasSamples()

void gamp::render::gl::GLCapabilities::setHasSamples ( bool enable)
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.

◆ samplesCount() [1/2]

int gamp::render::gl::GLCapabilities::samplesCount ( ) const
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.

Here is the caller graph for this function:

◆ samplesCount() [2/2]

int & gamp::render::gl::GLCapabilities::samplesCount ( )
inlineconstexprnoexcept

If sample buffers are enabled, indicates the number of buffers to be allocated.

Defaults to 2.

See also
#getNumSamples()

Definition at line 362 of file GLCapabilities.hpp.

◆ toString() [1/2]

std::string gamp::render::gl::GLCapabilities::toString ( ) const
inlineoverridevirtual

Returns a textual representation of this GLCapabilities object.

Reimplemented from gamp::wt::Capabilities.

Definition at line 366 of file GLCapabilities.hpp.

Here is the caller graph for this function:

◆ toString() [2/2]

std::string gamp::render::gl::GLCapabilities::toString ( std::string & sink) const
inlineprotected

Definition at line 374 of file GLCapabilities.hpp.


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