Class holding and managing video-related application options. More...
#include <eagine/application/options.hpp>
Public Types | |
using | valid_gl_major_version = valid_if_positive< int > |
Alias for GL major version value type. | |
using | valid_gl_minor_version = valid_if_nonnegative< int > |
Alias for GL minor version value type. | |
using | valid_surface_size = valid_if_positive< int > |
Alias for the video surface width or height dimension value type. | |
using | valid_samples = valid_if_nonnegative< int > |
Alias for the number of pixel samples value type. | |
using | valid_color_bits = valid_if_between< int, 0, 16 > |
Alias for color channel bit count value type. | |
using | valid_alpha_bits = valid_if_between< int, 0, 16 > |
Alias for alpha channel bit count value type. | |
using | valid_depth_bits = valid_if_between< int, 0, 32 > |
Alias for depth buffer bit count value type. | |
using | valid_stencil_bits = valid_if_one_of< int, 0, 8 > |
Alias for stencil buffer bit count value type. | |
Public Member Functions | |
auto | video_kind () const noexcept -> video_context_kind |
Returns the requested video rendering context kind. | |
auto | set_provider (std::string name) -> auto & |
Sets the video provider identifier name. More... | |
auto | has_provider () const noexcept -> bool |
Indicates if video provider name is set (not empty). More... | |
auto | has_provider (string_view name) const noexcept -> bool |
Indicates if video provider name is the same as the argument. More... | |
auto | provider () const noexcept -> valid_if_not_empty< string_view > |
Returns the assigned provider name. | |
auto | display_name () const noexcept -> valid_if_not_empty< string_view > |
Returns the display name string (this may be provider-specific). More... | |
auto | driver_name () const noexcept -> valid_if_not_empty< string_view > |
Returns the driver name string (this may be provider-specific). More... | |
auto | device_path () const noexcept -> valid_if_not_empty< string_view > |
Returns the driver name string (this may be provider-specific). More... | |
auto | device_kind () const noexcept -> valid_if_not< video_device_kind, video_device_kind::dont_care > |
Returns the rendering device kind (this may be provider-specific). More... | |
auto | device_index () const noexcept -> valid_if_nonnegative< span_size_t > |
Returns the rendering device index (this may be provider-specific). More... | |
auto | prefer_gles () const noexcept -> bool |
Indicates that if both GL and GL|ES is available, ES should be used. More... | |
auto | gl_version_major () const noexcept -> valid_gl_major_version |
Returns the preferred GL major version number. | |
auto | gl_version_minor () const noexcept -> valid_gl_minor_version |
Returns the preferred GL major version number. More... | |
auto | gl_compatibility_context () const noexcept -> bool |
Returns the preferred GL minor version number. More... | |
auto | gl_debug_context () const noexcept -> bool |
Indicates if a debug GL context should be created. More... | |
auto | gl_robust_access () const noexcept -> bool |
Indicates if a GL context with robust access checks should be created. More... | |
auto | surface_size (valid_surface_size width, valid_surface_size height) -> auto & |
Sets the rendering surface size. | |
auto | surface_width () const noexcept -> valid_surface_size |
Returns the rendering surface width (in pixels). More... | |
auto | surface_height () const noexcept -> valid_surface_size |
Returns the rendering surface height (in pixels). More... | |
auto | samples (const valid_samples &value) noexcept -> auto & |
Sets the number of per-pixel samples. More... | |
auto | samples_dont_care () noexcept -> auto & |
Sets the number of per-pixel samples to a "don't care" value. More... | |
auto | samples () const noexcept -> valid_if_positive< int > |
Returns the number of per-pixel samples. | |
auto | color_bits (const valid_color_bits &value) noexcept -> auto & |
Sets the number of red, green and blue channel bits. More... | |
auto | color_bits () const noexcept -> valid_if_positive< int > |
Returns the number of red, green and blue channel bits. | |
auto | alpha_bits (const valid_alpha_bits &value) noexcept -> auto & |
Sets the number of alpha channel bits. More... | |
auto | with_alpha () noexcept -> auto & |
Sets the number of alpha channel bits to a default non-zero value. More... | |
auto | alpha_bits () const noexcept -> valid_if_positive< int > |
Returns the number of alpha channel bits. | |
auto | depth_bits (const valid_depth_bits &value) noexcept -> auto & |
Sets the number of depth buffer bits. More... | |
auto | with_depth () noexcept -> auto & |
Sets the number of depth buffer bits to a default non-zero value. More... | |
auto | depth_bits () const noexcept -> valid_if_positive< int > |
Returns the number of depth buffer bits. | |
auto | stencil_bits (const valid_stencil_bits &value) noexcept -> auto & |
Sets the number of stencil buffer bits. More... | |
auto | with_stencil () noexcept -> auto & |
Sets the number of stencil buffer bits to a default non-zero value. More... | |
auto | stencil_bits () const noexcept -> valid_if_positive< int > |
Returns the number of stencil buffer bits. | |
auto | offscreen (bool value) noexcept -> auto & |
Requests an off-screen rendering surface. More... | |
auto | offscreen () const noexcept -> bool |
Indicates if an off-screen rendering surface was requested. | |
auto | fullscreen (bool value) noexcept -> auto & |
Requests an full-screen rendering surface. More... | |
auto | fullscreen () const noexcept -> bool |
Indicates if an full-screen rendering surface was requested. | |
auto | framedump_prefix () const noexcept -> string_view |
Returns a filesystem prefix for framedump image files. | |
auto | framedump_color () const noexcept -> framedump_data_type |
Returns the pixel data type for color/alpha buffer frame dumps. | |
auto | framedump_depth () const noexcept -> framedump_data_type |
Returns the pixel data type for depth buffer frame dumps. | |
auto | framedump_stencil () const noexcept -> framedump_data_type |
Returns the pixel data type for stencil buffer frame dumps. | |
auto | doing_framedump () const noexcept -> bool |
Indicates if a frame dump render run is requested. | |
Class holding and managing video-related application options.
Instances of this class read the application configuration and provide access to video/graphics rendering-related options.
|
inlinenoexcept |
Sets the number of alpha channel bits.
|
inlinenoexcept |
Sets the number of red, green and blue channel bits.
|
inlinenoexcept |
Sets the number of depth buffer bits.
|
inlinenoexcept |
Returns the rendering device index (this may be provider-specific).
|
inlinenoexcept |
Returns the rendering device kind (this may be provider-specific).
|
inlinenoexcept |
Returns the driver name string (this may be provider-specific).
|
inlinenoexcept |
Returns the display name string (this may be provider-specific).
|
inlinenoexcept |
Returns the driver name string (this may be provider-specific).
|
inlinenoexcept |
Requests an full-screen rendering surface.
|
inlinenoexcept |
Returns the preferred GL minor version number.
|
inlinenoexcept |
Indicates if a debug GL context should be created.
|
inlinenoexcept |
Indicates if a GL context with robust access checks should be created.
|
inlinenoexcept |
Returns the preferred GL major version number.
|
inlinenoexcept |
Indicates if video provider name is set (not empty).
|
inlinenoexcept |
Indicates if video provider name is the same as the argument.
|
inlinenoexcept |
Requests an off-screen rendering surface.
|
inlinenoexcept |
Indicates that if both GL and GL|ES is available, ES should be used.
|
inlinenoexcept |
Sets the number of per-pixel samples.
|
inlinenoexcept |
Sets the number of per-pixel samples to a "don't care" value.
|
inline |
Sets the video provider identifier name.
|
inlinenoexcept |
Sets the number of stencil buffer bits.
|
inlinenoexcept |
Returns the rendering surface height (in pixels).
|
inlinenoexcept |
Returns the rendering surface width (in pixels).
|
inlinenoexcept |
Sets the number of alpha channel bits to a default non-zero value.
|
inlinenoexcept |
Sets the number of depth buffer bits to a default non-zero value.
|
inlinenoexcept |
Sets the number of stencil buffer bits to a default non-zero value.