Gamp v0.0.7-36-g24b1eb6
Gamp: Graphics, Audio, Multimedia and Processing
|
Specifies a set of capabilities that a window's rendering context must support, such as color depth per channel. More...
#include <Capabilities.hpp>
Public Member Functions | |
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. | |
virtual CapabilitiesPtr | clone () const noexcept |
virtual int | compare (const Capabilities &rhs) const noexcept |
Comparing RGBA values only. | |
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. | |
virtual std::size_t | hash_code () const noexcept |
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 |
virtual bool | operator== (const Capabilities &rhs) const noexcept |
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. | |
virtual const jau::type_info & | signature () const noexcept |
virtual std::string | toString () const |
Returns a textual representation of this Capabilities object. | |
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 | |
void | toString (std::string &sink, bool withOnOffScreen) const |
Static Protected Attributes | |
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 capabilities that a window's rendering context must support, such as color depth per channel.
It currently contains the minimal number of routines which allow configuration on all supported window systems.
Definition at line 33 of file Capabilities.hpp.
|
constexprdefaultnoexcept |
Creates a Capabilities object.
All attributes are in a default state.
|
virtualdefaultnoexcept |
|
constexprdefaultnoexcept |
|
constexprdefaultnoexcept |
|
defaultnoexcept |
|
inlinevirtualnoexcept |
Reimplemented in gamp::render::gl::GLCapabilities.
Definition at line 69 of file Capabilities.hpp.
|
inlinevirtualnoexcept |
Reimplemented in gamp::render::gl::GLCapabilities.
Definition at line 71 of file Capabilities.hpp.
|
inlinevirtualnoexcept |
Reimplemented in gamp::render::gl::GLCapabilities.
Definition at line 73 of file Capabilities.hpp.
|
inlinevirtualnoexcept |
Reimplemented in gamp::render::gl::GLCapabilities.
Definition at line 89 of file Capabilities.hpp.
|
inlinevirtualnoexcept |
Comparing RGBA values only.
Returns
Reimplemented in gamp::render::gl::GLCapabilities.
Definition at line 129 of file Capabilities.hpp.
|
inlinenoexcept |
Definition at line 146 of file Capabilities.hpp.
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
Returns the number of bits for the color buffer's red component.
On some systems only the color depth, which is the sum of the red, green, and blue bits, is considered.
Definition at line 157 of file Capabilities.hpp.
|
inlineconstexprnoexcept |
Returns the number of bits for the color buffer's green component.
On some systems only the color depth, which is the sum of the red, green, and blue bits, is considered.
Definition at line 163 of file Capabilities.hpp.
|
inlineconstexprnoexcept |
Returns the number of bits for the color buffer's blue component.
On some systems only the color depth, which is the sum of the red, green, and blue bits, is considered.
Definition at line 169 of file Capabilities.hpp.
|
inlineconstexprnoexcept |
Returns the number of bits for the color buffer's alpha component.
On some systems only the color depth, which is the sum of the red, green, and blue bits, is considered.
Definition at line 175 of file Capabilities.hpp.
|
inlineconstexprnoexcept |
Definition at line 177 of file Capabilities.hpp.
|
inlineconstexprnoexcept |
Allows setting the number of bits requested for the color buffer's red component.
On some systems only the color depth, which is the sum of the red, green, and blue bits, is considered.
Definition at line 182 of file Capabilities.hpp.
|
inlineconstexprnoexcept |
Allows setting the number of bits requested for the color buffer's green component.
On some systems only the color depth, which is the sum of the red, green, and blue bits, is considered.
Definition at line 187 of file Capabilities.hpp.
|
inlineconstexprnoexcept |
Allows setting the number of bits requested for the color buffer's blue component.
On some systems only the color depth, which is the sum of the red, green, and blue bits, is considered.
Definition at line 192 of file Capabilities.hpp.
|
inlineconstexprnoexcept |
Allows setting the number of bits requested for the color buffer's alpha component.
On some systems only the color depth, which is the sum of the red, green, and blue bits, is considered.
Note: If alpha bits are zero
, they are set to one
by setBackgroundOpaque(boolean)
and it's OpenGL specialization GLCapabilities::setSampleBuffers(boolean)
.
Ensure to call this method after the above to ensure a zero
value. The above automated settings takes into account, that the user calls this method to request alpha bits, not to reflect a current state. Nevertheless if this is the case - call it at last.
Definition at line 206 of file Capabilities.hpp.
|
inlineconstexprnoexcept |
Sets whether the surface shall be opaque or translucent.
Platform implementations may need an alpha component in the surface (eg. Windows), or expect pre-multiplied alpha values (eg. X11/XRender).
To unify the experience, this method also invokes setAlphaBits(1)
if getAlphaBits()
== 0.
Please note that in case alpha is required on the platform the clear color shall have an alpha lower than 1.0 to allow anything shining through.
Mind that translucency may cause a performance penalty due to the composite work required by the window manager.
Definition at line 223 of file Capabilities.hpp.
|
inlineconstexprnoexcept |
Returns whether an opaque or translucent surface is requested, supported or chosen.
Default is true, i.e. opaque.
Definition at line 236 of file Capabilities.hpp.
|
inlineconstexprnoexcept |
Sets whether the surface shall be on- or offscreen.
Defaults to true.
If requesting an offscreen surface without further selection of it's mode, e.g. FBO, Pbuffer or bitmap
, the implementation will choose the best available offscreen mode.
onscreen |
Definition at line 250 of file Capabilities.hpp.
|
inlineconstexprnoexcept |
Returns whether an on- or offscreen surface is requested, available or chosen.
Default is true, i.e. onscreen.
Mind that an capabilities intance w/ available semantics may show onscreen, but also the offscreen modes FBO or bitmap
. This is valid, since one native configuration maybe used for either functionality.
Definition at line 263 of file Capabilities.hpp.
|
inlineconstexprnoexcept |
Requesting offscreen bitmap mode.
If enabled this method also invokes setOnscreen(false)
.
Defaults to false.
Requesting offscreen bitmap mode disables the offscreen auto selection.
Definition at line 277 of file Capabilities.hpp.
|
inlineconstexprnoexcept |
Returns whether bitmap 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 293 of file Capabilities.hpp.
|
inlineconstexprnoexcept |
Gets the transparent red value for the frame buffer configuration.
This value is undefined if; equals true.
Definition at line 299 of file Capabilities.hpp.
|
inlineconstexprnoexcept |
Gets the transparent green value for the frame buffer configuration.
This value is undefined if; equals true.
Definition at line 304 of file Capabilities.hpp.
|
inlineconstexprnoexcept |
Gets the transparent blue value for the frame buffer configuration.
This value is undefined if; equals true.
Definition at line 309 of file Capabilities.hpp.
|
inlineconstexprnoexcept |
Gets the transparent alpha value for the frame buffer configuration.
This value is undefined if; equals true.
Definition at line 314 of file Capabilities.hpp.
|
inlineconstexprnoexcept |
Allows setting the transparent red value for the frame buffer configuration, ranging from 0 to the maximum frame buffer value for red.
This value is ignored if isBackgroundOpaque()
equals true.
It defaults to half of the frambuffer value for red.
A value of -1 is interpreted as any value.
Definition at line 321 of file Capabilities.hpp.
|
inlineconstexprnoexcept |
Allows setting the transparent green value for the frame buffer configuration, ranging from 0 to the maximum frame buffer value for green.
This value is ignored if isBackgroundOpaque()
equals true.
It defaults to half of the frambuffer value for green.
A value of -1 is interpreted as any value.
Definition at line 328 of file Capabilities.hpp.
|
inlineconstexprnoexcept |
Allows setting the transparent blue value for the frame buffer configuration, ranging from 0 to the maximum frame buffer value for blue.
This value is ignored if isBackgroundOpaque()
equals true.
It defaults to half of the frambuffer value for blue.
A value of -1 is interpreted as any value.
Definition at line 335 of file Capabilities.hpp.
|
inlineconstexprnoexcept |
Allows setting the transparent alpha value for the frame buffer configuration, ranging from 0 to the maximum frame buffer value for alpha.
This value is ignored if isBackgroundOpaque()
equals true.
It defaults to half of the frambuffer value for alpha.
A value of -1 is interpreted as any value.
Definition at line 342 of file Capabilities.hpp.
|
inlinevirtual |
Returns a textual representation of this Capabilities object.
Reimplemented in gamp::render::gl::GLCapabilities.
Definition at line 346 of file Capabilities.hpp.
|
inlineprotected |
Definition at line 358 of file Capabilities.hpp.
|
staticconstexprprotected |
Definition at line 35 of file Capabilities.hpp.
|
staticconstexprprotected |
Element separator.
Definition at line 354 of file Capabilities.hpp.
|
staticconstexprprotected |
Component separator.
Definition at line 356 of file Capabilities.hpp.