pub struct Context<T: ContextCurrentState> { /* private fields */ }
Expand description

Represents an OpenGL Context.

A Context is normally associated with a single Window, however Contexts can be shared between multiple windows or be headless.

If a Context is backed by a window, it will be wrapped by either RawContext<T> or WindowedContext<T>.

Example

let cb = glutin::ContextBuilder::new()
    .with_vsync(true)
    .with_multisampling(8)
    .with_shared_lists(some_context.context());

Implementations

Trait Implementations

Raw context handle.
Returns the raw context handle.
Returns a pointer to the EGLDisplay object of EGL that is used by this context. Read more
Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.