Struct glutin::Context [−][src]
pub struct Context { /* fields omitted */ }Represents an OpenGL context.
A Context is normally associated with a single Window, however Contexts 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 GlContextExt for Context[src]
impl GlContextExt for Contexttype Handle = RawHandle
Raw context handle.
unsafe fn raw_handle(&self) -> Self::Handle[src]
unsafe fn raw_handle(&self) -> Self::HandleReturns the raw context handle.
impl GlContext for Context[src]
impl GlContext for Contextunsafe fn make_current(&self) -> Result<(), ContextError>[src]
unsafe fn make_current(&self) -> Result<(), ContextError>Sets the context as the current context.
fn is_current(&self) -> bool[src]
fn is_current(&self) -> boolReturns true if this context is the current one in this thread.
fn get_proc_address(&self, addr: &str) -> *const ()[src]
fn get_proc_address(&self, addr: &str) -> *const ()Returns the address of an OpenGL function.
fn swap_buffers(&self) -> Result<(), ContextError>[src]
fn swap_buffers(&self) -> Result<(), ContextError>Swaps the buffers in case of double or triple buffering. Read more
fn get_api(&self) -> Api[src]
fn get_api(&self) -> ApiReturns the OpenGL API being used.
fn get_pixel_format(&self) -> PixelFormat[src]
fn get_pixel_format(&self) -> PixelFormatReturns the pixel format of the main framebuffer of the context.
fn resize(&self, size: PhysicalSize)[src]
fn resize(&self, size: PhysicalSize)Resize the GL context. Read more