[][src]Trait gpu::HasContext

pub trait HasContext: HasGLContext {
    fn new(builder: &ContextBuilder) -> Self
    where
        Self: Sized
;
fn run(&mut self) -> bool;
fn make_current(&self) -> Result<(), ContextError>;
fn swap_buffers(&self) -> Result<(), ContextError>;
fn get_proc_address(&self, addr: &str) -> *const ();
fn inner_dimensions(&self) -> (usize, usize); }

A trait defining the GPUContext interface.

Required methods

fn new(builder: &ContextBuilder) -> Self where
    Self: Sized

Creates a new Context.

fn run(&mut self) -> bool

Runs the Context and returns false if the Context is no longer available.

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

Makes the Context current for the current thread.

fn swap_buffers(&self) -> Result<(), ContextError>

Swap buffers for presenting in the ContextDisplay.

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

OpenGL function dynamic loading.

fn inner_dimensions(&self) -> (usize, usize)

Gets the inner dimensions of the ContextDisplay.

Loading content...

Implementors

impl HasContext for Context[src]

Loading content...