|
Gamp v0.0.8
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 |
| Returns the reference to the number of bits for the color buffer's blue component. | |
| constexpr int | blueBits () const noexcept |
| Returns the number of bits for the color buffer's blue component. | |
| constexpr int & | blueBits () noexcept |
| Returns the reference to the number of bits 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 |
| Returns the reference to the number of bits 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 |
| Returns the reference to the number of bits 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.
Default (bit-sizes):
Definition at line 46 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 82 of file Capabilities.hpp.
|
inlinevirtualnoexcept |
Reimplemented in gamp::render::gl::GLCapabilities.
Definition at line 84 of file Capabilities.hpp.
|
inlinevirtualnoexcept |
Reimplemented in gamp::render::gl::GLCapabilities.
Definition at line 86 of file Capabilities.hpp.
|
inlinevirtualnoexcept |
Reimplemented in gamp::render::gl::GLCapabilities.
Definition at line 102 of file Capabilities.hpp.
|
inlinevirtualnoexcept |
Comparing RGBA values only.
Returns
Reimplemented in gamp::render::gl::GLCapabilities.
Definition at line 142 of file Capabilities.hpp.
|
inlinenoexcept |
Definition at line 159 of file Capabilities.hpp.
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
Returns the number of bits for the color buffer's red component.
Definition at line 166 of file Capabilities.hpp.
|
inlineconstexprnoexcept |
Returns the number of bits for the color buffer's green component.
Definition at line 168 of file Capabilities.hpp.
|
inlineconstexprnoexcept |
Returns the number of bits for the color buffer's blue component.
Definition at line 170 of file Capabilities.hpp.
|
inlineconstexprnoexcept |
Returns the number of bits for the color buffer's alpha component.
Definition at line 172 of file Capabilities.hpp.
|
inlineconstexprnoexcept |
Definition at line 174 of file Capabilities.hpp.
|
inlineconstexprnoexcept |
Returns the reference to the number of bits for the color buffer's red component.
Definition at line 177 of file Capabilities.hpp.
|
inlineconstexprnoexcept |
Returns the reference to the number of bits for the color buffer's green component.
Definition at line 180 of file Capabilities.hpp.
|
inlineconstexprnoexcept |
Returns the reference to the number of bits for the color buffer's blue component.
Definition at line 183 of file Capabilities.hpp.
|
inlineconstexprnoexcept |
Returns the reference to the number of bits for the color buffer's blue component.
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 194 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 211 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 224 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 238 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 251 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 265 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 281 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 287 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 292 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 297 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 302 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 309 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 316 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 323 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 330 of file Capabilities.hpp.
|
inlinevirtual |
Returns a textual representation of this Capabilities object.
Reimplemented in gamp::render::gl::GLCapabilities.
Definition at line 334 of file Capabilities.hpp.
|
inlineprotected |
Definition at line 346 of file Capabilities.hpp.
|
staticconstexprprotected |
Definition at line 48 of file Capabilities.hpp.
|
staticconstexprprotected |
Element separator.
Definition at line 342 of file Capabilities.hpp.
|
staticconstexprprotected |
Component separator.
Definition at line 344 of file Capabilities.hpp.