RenderBundleEncoderInterface

Trait RenderBundleEncoderInterface 

Source
pub trait RenderBundleEncoderInterface: CommonTraits {
    // Required methods
    fn set_pipeline(&mut self, pipeline: &DispatchRenderPipeline);
    fn set_bind_group(
        &mut self,
        index: u32,
        bind_group: Option<&DispatchBindGroup>,
        offsets: &[DynamicOffset],
    );
    fn set_index_buffer(
        &mut self,
        buffer: &DispatchBuffer,
        index_format: IndexFormat,
        offset: BufferAddress,
        size: Option<BufferSize>,
    );
    fn set_vertex_buffer(
        &mut self,
        slot: u32,
        buffer: Option<&DispatchBuffer>,
        offset: BufferAddress,
        size: Option<BufferSize>,
    );
    fn set_immediates(&mut self, offset: u32, data: &[u8]);
    fn draw(&mut self, vertices: Range<u32>, instances: Range<u32>);
    fn draw_indexed(
        &mut self,
        indices: Range<u32>,
        base_vertex: i32,
        instances: Range<u32>,
    );
    fn draw_indirect(
        &mut self,
        indirect_buffer: &DispatchBuffer,
        indirect_offset: BufferAddress,
    );
    fn draw_indexed_indirect(
        &mut self,
        indirect_buffer: &DispatchBuffer,
        indirect_offset: BufferAddress,
    );
    fn finish(self, desc: &RenderBundleDescriptor<'_>) -> DispatchRenderBundle
       where Self: Sized;
    fn finish_boxed(
        self: Box<Self>,
        desc: &RenderBundleDescriptor<'_>,
    ) -> DispatchRenderBundle;
}
Available on custom only.

Required Methods§

Source

fn set_pipeline(&mut self, pipeline: &DispatchRenderPipeline)

Source

fn set_bind_group( &mut self, index: u32, bind_group: Option<&DispatchBindGroup>, offsets: &[DynamicOffset], )

Source

fn set_index_buffer( &mut self, buffer: &DispatchBuffer, index_format: IndexFormat, offset: BufferAddress, size: Option<BufferSize>, )

Source

fn set_vertex_buffer( &mut self, slot: u32, buffer: Option<&DispatchBuffer>, offset: BufferAddress, size: Option<BufferSize>, )

Source

fn set_immediates(&mut self, offset: u32, data: &[u8])

Source

fn draw(&mut self, vertices: Range<u32>, instances: Range<u32>)

Source

fn draw_indexed( &mut self, indices: Range<u32>, base_vertex: i32, instances: Range<u32>, )

Source

fn draw_indirect( &mut self, indirect_buffer: &DispatchBuffer, indirect_offset: BufferAddress, )

Source

fn draw_indexed_indirect( &mut self, indirect_buffer: &DispatchBuffer, indirect_offset: BufferAddress, )

Source

fn finish(self, desc: &RenderBundleDescriptor<'_>) -> DispatchRenderBundle
where Self: Sized,

Source

fn finish_boxed( self: Box<Self>, desc: &RenderBundleDescriptor<'_>, ) -> DispatchRenderBundle

Object-safe version of finish for dyn dispatch through Box<dyn RenderBundleEncoderInterface>.

A default implementation cannot be provided here: a default that calls finish would require Self: Sized (to move out of the box), which would remove the method from the vtable and break object safety. Every concrete backend must implement this as:

fn finish_boxed(self: Box<Self>, desc: &RenderBundleDescriptor<'_>) -> DispatchRenderBundle {
    (*self).finish(desc)
}

Implementors§