pub trait ContextSwitchExt<'window> {
    // Required method
    fn set_context<'context: 'window>(
        &'window self,
        context: GlContext<'context>
    ) -> Result<()>;
}
Expand description

An extension for Window to set OpenGL context.

Required Methods§

source

fn set_context<'context: 'window>( &'window self, context: GlContext<'context> ) -> Result<()>

Sets context to the window.

§Errors

Returns Err if failed to set the context to.

Implementors§

source§

impl<'window> ContextSwitchExt<'window> for Window<'window>