Struct gfx::render::batch::Context [] [src]

pub struct Context<R: Resources> {
    // some fields omitted
}

Factory of ref batches, required to always be used with them.

Methods

impl<R: Resources> Context<R>

fn new() -> Context<R>

Create a new empty Context

impl<R: Resources> Context<R>

fn make_core<T: ShaderParam<Resources=R>>(&mut self, program: &ProgramHandle<R>, mesh: &Mesh<R>, state: &DrawState) -> Result<CoreBatch<T>, Error>

Produce a new CoreBatch

fn make_batch<T: ShaderParam<Resources=R>>(&mut self, program: &ProgramHandle<R>, params: T, mesh: &Mesh<R>, slice: Slice<R>, state: &DrawState) -> Result<RefBatch<T>, Error>

Produce a new RefBatch

fn bind<'a, T: ShaderParam<Resources=R> + 'a>(&'a self, core: &'a CoreBatch<T>, slice: &'a Slice<R>, params: &'a T) -> CoreBatchFull<'a, T>

Complete a CoreBatch temporarily by turning it into CoreBatchFull

fn get_data<'a, T: ShaderParam<Resources=R> + 'a>(&'a self, core: &CoreBatch<T>, slice: &'a Slice<R>) -> Result<BatchData<'a, T>, OutOfBounds>

Get data from a batch in the format required for Batch