Skip to main content

RenderPassEncoder

Trait RenderPassEncoder 

Source
pub trait RenderPassEncoder<D: Device> {
    // Required methods
    fn set_pipeline(&mut self, pipeline: &D::Pipeline);
    fn set_bind_group(
        &mut self,
        index: u32,
        group: &D::BindGroup,
        dynamic_offsets: &[u32],
    );
    fn draw(&mut self, vertices: Range<u32>, instances: Range<u32>);
    fn draw_indirect(&mut self, args: &D::Buffer, offset: u64);
}
Expand description

Records draws inside an open render pass.

Required Methods§

Source

fn set_pipeline(&mut self, pipeline: &D::Pipeline)

Sets the active pipeline.

Source

fn set_bind_group( &mut self, index: u32, group: &D::BindGroup, dynamic_offsets: &[u32], )

Binds a group at an index (0 frame / 1 pass / 2 representation / 3 material), with dynamic offsets where the layout declared them.

Source

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

Direct draw; used only for fullscreen passes whose vertex count is a constant, never per scene primitive.

Source

fn draw_indirect(&mut self, args: &D::Buffer, offset: u64)

Indirect draw against arguments a compute pass wrote; the only draw the scene-geometry path uses.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§