[][src]Trait luminance::context::GraphicsContext

pub unsafe trait GraphicsContext {
    fn state(&self) -> &Rc<RefCell<GraphicsState>>;

    fn pipeline_builder(&mut self) -> Builder<Self> { ... }
}

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.

Loading content...

Provided methods

fn pipeline_builder(&mut self) -> Builder<Self>

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.

Loading content...

Implementors

Loading content...