Struct gfx::Encoder [] [src]

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

Graphics commands encoder.

Methods

impl<R: Resources, C: CommandBuffer<R>> Encoder<R, C>
[src]

fn create<F>(factory: &mut F) -> Encoder<R, C> where F: Factory<R, CommandBuffer=C>

Create a new encoder using a factory.

fn reset(&mut self)

Reset all commands for the command buffer re-usal.

fn as_buffer<D>(&self) -> SubmitInfo<D> where D: Device<Resources=R, CommandBuffer=C>

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

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

Clone the renderer shared data but ignore the commands.

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

Update a buffer with a slice of data.

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

Update a buffer with a single structure.

fn update_texture<S, T>(&mut self, tex: &Texture<R, T>, face: Option<CubeFace>, img: NewImageInfo, data: &[S::DataType]) -> Result<()UpdateError<[Size; 3]>> where S: SurfaceTyped, S::DataType: Copy, T: Formatted<Surface=S>

Update the contents of a texture.

fn clear<T: RenderFormat>(&mut self, view: &RenderTargetView<R, T>, value: T::View) where T::View: Into<ClearColor>

Clear a target view with a specified value.

fn clear_depth<T: DepthFormat>(&mut self, view: &DepthStencilView<R, T>, depth: Depth)

Clear a depth view with a specified value.

fn clear_stencil<T: StencilFormat>(&mut self, view: &DepthStencilView<R, T>, stencil: Stencil)

Clear a stencil view with a specified value.

fn draw<D: PipelineData<R>>(&mut self, slice: &Slice<R>, pipeline: &PipelineState<R, D::Meta>, user_data: &D)

Draw a mesh slice using a typed pipeline state object (PSO).