Struct nannou::ui::backend::glium::glium::backend::glutin::glutin::GlAttributes[]

pub struct GlAttributes<S> {
    pub sharing: Option<S>,
    pub version: GlRequest,
    pub profile: Option<GlProfile>,
    pub debug: bool,
    pub robustness: Robustness,
    pub vsync: bool,
}

Attributes to use when creating an OpenGL context.

Fields

An existing context to share the new the context with.

The default is None.

Version to try create. See GlRequest for more infos.

The default is Latest.

OpenGL profile to use.

The default is None.

Whether to enable the debug flag of the context.

Debug contexts are usually slower but give better error reporting.

The default is true in debug mode and false in release mode.

How the OpenGL context should detect errors.

The default is NotRobust because this is what is typically expected when you create an OpenGL context. However for safety you should consider TryRobustLoseContextOnReset.

Whether to use vsync. If vsync is enabled, calling swap_buffers will block until the screen refreshes. This is typically used to prevent screen tearing.

The default is false.

Methods

impl<S> GlAttributes<S>

Turns the sharing parameter into another type by calling a closure.

Trait Implementations

impl<S> Clone for GlAttributes<S> where
    S: Clone

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<S> Default for GlAttributes<S>

Returns the "default value" for a type. Read more

Auto Trait Implementations

impl<S> Send for GlAttributes<S> where
    S: Send

impl<S> Sync for GlAttributes<S> where
    S: Sync