pub trait PossiblyCurrentGlContext: Sealed {
    type NotCurrentContext: NotCurrentGlContext;

    // Required methods
    fn is_current(&self) -> bool;
    fn make_not_current(self) -> Result<Self::NotCurrentContext>;
}
Expand description

A trait to group common context operations.

Required Associated Types§

source

type NotCurrentContext: NotCurrentGlContext

The not current context type.

Required Methods§

source

fn is_current(&self) -> bool

Returns true if this context is the current one in this thread.

source

fn make_not_current(self) -> Result<Self::NotCurrentContext>

Make the context not current to the current thread and returns a Self::NotCurrentContext to indicate that the context is a not current to allow sending it to the different thread.

Platform specific

macOS: - This will block if your main thread is blocked.

Implementors§

source§

impl PossiblyCurrentGlContext for glutin::context::PossiblyCurrentContext

source§

impl PossiblyCurrentGlContext for glutin::api::egl::context::PossiblyCurrentContext

Available on egl_backend only.
source§

impl PossiblyCurrentGlContext for glutin::api::wgl::context::PossiblyCurrentContext

Available on wgl_backend only.