Trait glutin::ContextTrait

source ·
pub trait ContextTraitwhere
    Self: Sized,{
    // Required methods
    unsafe fn make_current(&self) -> Result<(), ContextError>;
    fn is_current(&self) -> bool;
    fn get_proc_address(&self, addr: &str) -> *const ();
    fn get_api(&self) -> Api;
}
Expand description

A trait for types associated with a GL context.

Required Methods§

source

unsafe fn make_current(&self) -> Result<(), ContextError>

Sets the context as the current context.

source

fn is_current(&self) -> bool

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

source

fn get_proc_address(&self, addr: &str) -> *const ()

Returns the address of an OpenGL function.

source

fn get_api(&self) -> Api

Returns the OpenGL API being used.

Implementors§