Struct gfx::render::Renderer [] [src]

pub struct Renderer<R: Resources, C: CommandBuffer<R>> {
    // some fields omitted
}

Renderer front-end

Methods

impl<R: Resources, C: CommandBuffer<R>> Renderer<R, C>

fn reset(&mut self)

Reset all commands for the command buffer re-usal.

fn as_buffer(&self) -> (&C, &DataBuffer, &Manager<R>)

Get command and data buffers to be submitted to the device.

fn clone_empty(&self) -> Renderer<R, C>

Clone the renderer shared data but ignore the commands.

fn clear<O: Output<R>>(&mut self, data: ClearData, mask: Mask, output: &O)

Clear the output with given ClearData.

fn draw<B: Batch<R>, O: Output<R>>(&mut self, batch: &B, output: &O) -> Result<(), DrawError<B>>

Draw a batch into the specified output.

fn draw_instanced<B: Batch<R>, O: Output<R>>(&mut self, batch: &B, count: InstanceCount, base: VertexCount, output: &O) -> Result<(), DrawError<B>>

Draw a batch multiple times using instancing.

fn blit<I: Output<R>, O: Output<R>>(&mut self, source: &I, source_rect: Rect, destination: &O, dest_rect: Rect, mirror: Mirror, mask: Mask)

Blit one frame onto another.

fn update_buffer_vec<T: Copy>(&mut self, buf: &Buffer<R, T>, data: &[T], offset_elements: usize)

Update a buffer with data from a vector.

fn update_buffer_struct<U, T: Copy>(&mut self, buf: &Buffer<R, U>, data: &T)

Update a buffer with data from a single type.

fn update_texture<T: Copy>(&mut self, tex: &Texture<R>, img: ImageInfo, data: &[T])

Update the contents of a texture.