Trait glutin::config::GlConfig

source ·
pub trait GlConfig: Sealed {
    // Required methods
    fn color_buffer_type(&self) -> Option<ColorBufferType>;
    fn float_pixels(&self) -> bool;
    fn alpha_size(&self) -> u8;
    fn depth_size(&self) -> u8;
    fn stencil_size(&self) -> u8;
    fn num_samples(&self) -> u8;
    fn srgb_capable(&self) -> bool;
    fn supports_transparency(&self) -> Option<bool>;
    fn hardware_accelerated(&self) -> bool;
    fn config_surface_types(&self) -> ConfigSurfaceTypes;
    fn api(&self) -> Api;
}
Expand description

The trait to group all common config option.

Required Methods§

source

fn color_buffer_type(&self) -> Option<ColorBufferType>

The type of the underlying color buffer.

None is returned when the format can not be identified.

source

fn float_pixels(&self) -> bool

Whether the config uses floating pixels.

source

fn alpha_size(&self) -> u8

The size of the alpha.

source

fn depth_size(&self) -> u8

The size of the depth buffer.

source

fn stencil_size(&self) -> u8

The size of the stencil buffer.

source

fn num_samples(&self) -> u8

The number of samples in multisample buffer.

Zero would mean that there’re no samples.

source

fn srgb_capable(&self) -> bool

Whether the config supports creating srgb capable Surface.

source

fn supports_transparency(&self) -> Option<bool>

Whether the config supports creating transparent surfaces.

This function will return None when the property couldn’t be identified, in that case transparent window could still work.

source

fn hardware_accelerated(&self) -> bool

Whether the config is hardware accelerated.

The meaning of this may vary from system to system. On some it could mean that you’re using a software backend renderer, it could mean that you’re using not the fastest available GPU, like in laptops with hybrid graphics.

source

fn config_surface_types(&self) -> ConfigSurfaceTypes

The type of the surfaces that can be created with this config.

source

fn api(&self) -> Api

The crate::config::Api supported by the configuration.

Implementors§

source§

impl GlConfig for glutin::config::Config

source§

impl GlConfig for glutin::api::cgl::config::Config

Available on cgl_backend only.