Struct simple_wgpu::DrawCall
source · pub struct DrawCall {
pub bind_groups: Vec<BindGroup>,
pub bind_group_offsets: Vec<Vec<u32>>,
pub pipeline: RenderPipeline,
pub vertices: Vec<BufferSlice>,
pub indices: Option<BufferSlice>,
pub element_range: Range<usize>,
pub instance_range: Range<usize>,
pub rasteriser_state: RasteriserState,
}
Expand description
All of the data needed to issue a single draw call
Fields§
§bind_groups: Vec<BindGroup>
§bind_group_offsets: Vec<Vec<u32>>
§pipeline: RenderPipeline
§vertices: Vec<BufferSlice>
The vertex buffers, if any
The provided buffers will be bound in order to vertex buffer slots 0..N
indices: Option<BufferSlice>
The index buffer, if any
If indices
is None
, the mesh data will be treated as unindexed
element_range: Range<usize>
The range of vertices to draw
instance_range: Range<usize>
The range of instances to draw
You can pass 0..1
to disable instancing
rasteriser_state: RasteriserState
Additional state that is convenient to vary on a per-draw basis