Struct glutin::GlAttributes [−][src]
pub struct GlAttributes<S> {
pub sharing: Option<S>,
pub version: GlRequest,
pub profile: Option<GlProfile>,
pub debug: bool,
pub robustness: Robustness,
pub vsync: bool,
}Expand description
Attributes to use when creating an OpenGL Context.
Fields
sharing: Option<S>An existing context with which some OpenGL objects get shared.
The default is None.
version: GlRequestprofile: Option<GlProfile>OpenGL profile to use.
The default is None.
debug: boolWhether 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.
robustness: RobustnessHow 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.
vsync: boolWhether 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.
Implementations
Turns the sharing parameter into another type by calling a closure.
Trait Implementations
Returns the “default value” for a type. Read more
Auto Trait Implementations
impl<S> RefUnwindSafe for GlAttributes<S> where
S: RefUnwindSafe,
impl<S> Send for GlAttributes<S> where
S: Send,
impl<S> Sync for GlAttributes<S> where
S: Sync,
impl<S> Unpin for GlAttributes<S> where
S: Unpin,
impl<S> UnwindSafe for GlAttributes<S> where
S: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more
