Trait luminance::context::GraphicsContext [−][src]
pub unsafe trait GraphicsContext { fn state(&self) -> &Rc<RefCell<GraphicsState>>; fn swap_buffers(&mut self); fn pipeline_builder(&self) -> Builder { ... } }
Class of graphics context.
Such a context must not be Send nor Sync, which means that you cannot share it between threads in any way (move / borrow).
Required Methods
fn state(&self) -> &Rc<RefCell<GraphicsState>>
Get access to the graphics state of this context.
This must return a Rc<RefCell<GraphicsState>>
because the state will be shared by OpenGL
objects to ensure consistency with its state.
fn swap_buffers(&mut self)
Swap the back and front buffers.
Provided Methods
fn pipeline_builder(&self) -> Builder
Create a new pipeline builder.
A pipeline builder is the only way to create new pipelines and issue draws. Feel free to dig
in the documentation of Builder
for further details.