pub trait GlContextwhere
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§
sourceunsafe fn make_current(&self) -> Result<(), ContextError>
unsafe fn make_current(&self) -> Result<(), ContextError>
Sets the context as the current context.
sourcefn is_current(&self) -> bool
fn is_current(&self) -> bool
Returns true if this context is the current one in this thread.
sourcefn get_proc_address(&self, addr: &str) -> *const ()
fn get_proc_address(&self, addr: &str) -> *const ()
Returns the address of an OpenGL function.