OGLplus  (0.59.0) a C++ wrapper for rendering APIs

eagine::application::video_options Class Reference

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.
 

Detailed Description

Class holding and managing video-related application options.

See also
audio_options
launch_options
application_config

Instances of this class read the application configuration and provide access to video/graphics rendering-related options.

Member Function Documentation

◆ alpha_bits()

auto eagine::application::video_options::alpha_bits ( const valid_alpha_bits value) -> auto&
inlinenoexcept

Sets the number of alpha channel bits.

See also
color_bits
depth_bits
stencil_bits

◆ color_bits()

auto eagine::application::video_options::color_bits ( const valid_color_bits value) -> auto&
inlinenoexcept

Sets the number of red, green and blue channel bits.

See also
alpha_bits
depth_bits
stencil_bits

◆ depth_bits()

auto eagine::application::video_options::depth_bits ( const valid_depth_bits value) -> auto&
inlinenoexcept

Sets the number of depth buffer bits.

See also
color_bits
alpha_bits
stencil_bits

◆ device_index()

auto eagine::application::video_options::device_index ( ) const -> valid_if_nonnegative<span_size_t>
inlinenoexcept

Returns the rendering device index (this may be provider-specific).

See also
display_name
driver_name
device_path
device_kind

◆ device_kind()

auto eagine::application::video_options::device_kind ( ) const -> valid_if_not<video_device_kind, video_device_kind::dont_care>
inlinenoexcept

Returns the rendering device kind (this may be provider-specific).

See also
display_name
driver_name
device_path
device_index

◆ device_path()

auto eagine::application::video_options::device_path ( ) const -> valid_if_not_empty<string_view>
inlinenoexcept

Returns the driver name string (this may be provider-specific).

See also
display_name
driver_name
device_kind

◆ display_name()

auto eagine::application::video_options::display_name ( ) const -> valid_if_not_empty<string_view>
inlinenoexcept

Returns the display name string (this may be provider-specific).

See also
driver_name
device_path
device_kind

◆ driver_name()

auto eagine::application::video_options::driver_name ( ) const -> valid_if_not_empty<string_view>
inlinenoexcept

Returns the driver name string (this may be provider-specific).

See also
display_name
device_path
device_kind

◆ fullscreen()

auto eagine::application::video_options::fullscreen ( bool  value) -> auto&
inlinenoexcept

Requests an full-screen rendering surface.

See also
offscreen

◆ gl_compatibility_context()

auto eagine::application::video_options::gl_compatibility_context ( ) const -> bool
inlinenoexcept

Returns the preferred GL minor version number.

See also
gl_version_major
prefer_gles

◆ gl_debug_context()

auto eagine::application::video_options::gl_debug_context ( ) const -> bool
inlinenoexcept

Indicates if a debug GL context should be created.

See also
gl_robust_access

◆ gl_robust_access()

auto eagine::application::video_options::gl_robust_access ( ) const -> bool
inlinenoexcept

Indicates if a GL context with robust access checks should be created.

See also
gl_debug_context

◆ gl_version_minor()

auto eagine::application::video_options::gl_version_minor ( ) const -> valid_gl_minor_version
inlinenoexcept

Returns the preferred GL major version number.

See also
gl_version_minor
prefer_gles

◆ has_provider() [1/2]

auto eagine::application::video_options::has_provider ( ) const -> bool
inlinenoexcept

Indicates if video provider name is set (not empty).

See also
set_provider

◆ has_provider() [2/2]

auto eagine::application::video_options::has_provider ( string_view  name) const -> bool
inlinenoexcept

Indicates if video provider name is the same as the argument.

See also
set_provider

◆ offscreen()

auto eagine::application::video_options::offscreen ( bool  value) -> auto&
inlinenoexcept

Requests an off-screen rendering surface.

See also
fullscreen

◆ prefer_gles()

auto eagine::application::video_options::prefer_gles ( ) const -> bool
inlinenoexcept

Indicates that if both GL and GL|ES is available, ES should be used.

See also
gl_version_major
gl_version_minor

◆ samples()

auto eagine::application::video_options::samples ( const valid_samples value) -> auto&
inlinenoexcept

Sets the number of per-pixel samples.

See also
samples_dont_care

◆ samples_dont_care()

auto eagine::application::video_options::samples_dont_care ( ) -> auto&
inlinenoexcept

Sets the number of per-pixel samples to a "don't care" value.

See also
samples

◆ set_provider()

auto eagine::application::video_options::set_provider ( std::string  name) -> auto&
inline

Sets the video provider identifier name.

See also
has_provider

◆ stencil_bits()

auto eagine::application::video_options::stencil_bits ( const valid_stencil_bits value) -> auto&
inlinenoexcept

Sets the number of stencil buffer bits.

See also
color_bits
alpha_bits
depth_bits

◆ surface_height()

auto eagine::application::video_options::surface_height ( ) const -> valid_surface_size
inlinenoexcept

Returns the rendering surface height (in pixels).

See also
surface_width

◆ surface_width()

auto eagine::application::video_options::surface_width ( ) const -> valid_surface_size
inlinenoexcept

Returns the rendering surface width (in pixels).

See also
surface_height

◆ with_alpha()

auto eagine::application::video_options::with_alpha ( ) -> auto&
inlinenoexcept

Sets the number of alpha channel bits to a default non-zero value.

See also
alpha_bits
with_depth
with_stencil

◆ with_depth()

auto eagine::application::video_options::with_depth ( ) -> auto&
inlinenoexcept

Sets the number of depth buffer bits to a default non-zero value.

See also
with_alpha
with_stencil

◆ with_stencil()

auto eagine::application::video_options::with_stencil ( ) -> auto&
inlinenoexcept

Sets the number of stencil buffer bits to a default non-zero value.

See also
with_alpha
with_depth

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

Copyright © 2015-2021 Matúš Chochlík.
<chochlik -at -gmail.com>
Documentation generated on Tue Apr 13 2021 by Doxygen (version 1.8.17).