Struct nannou::ui::backend::glium::glium::backend::glutin::glutin::Context [−]
pub struct Context { /* fields omitted */ }
Represents an OpenGL context.
A Context
is normally associated with a single Window, however Context
s can be shared
between multiple windows.
Example
let context = glutin::ContextBuilder::new() .with_vsync(true) .with_multisampling(8) .with_shared_lists(some_gl_window.context());
Trait Implementations
impl GlContext for Context
impl GlContext for Context
unsafe fn make_current(&self) -> Result<(), ContextError>
unsafe fn make_current(&self) -> Result<(), ContextError>
Sets the context as the current context.
fn is_current(&self) -> bool
fn is_current(&self) -> bool
Returns true if this context is the current one in this thread.
fn get_proc_address(&self, addr: &str) -> *const ()
fn get_proc_address(&self, addr: &str) -> *const ()
Returns the address of an OpenGL function.
fn swap_buffers(&self) -> Result<(), ContextError>
fn swap_buffers(&self) -> Result<(), ContextError>
Swaps the buffers in case of double or triple buffering. Read more
fn get_api(&self) -> Api
fn get_api(&self) -> Api
Returns the OpenGL API being used.
fn get_pixel_format(&self) -> PixelFormat
fn get_pixel_format(&self) -> PixelFormat
Returns the pixel format of the main framebuffer of the context.
fn resize(&self, width: u32, height: u32)
fn resize(&self, width: u32, height: u32)
Resize the GL context. Read more
impl GlContextExt for Context
impl GlContextExt for Context
type Handle = RawHandle
Raw context handle.
unsafe fn raw_handle(&self) -> <Context as GlContextExt>::Handle
unsafe fn raw_handle(&self) -> <Context as GlContextExt>::Handle
Returns the raw context handle.