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
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DrawCall
impl !RefUnwindSafe for DrawCall
impl Send for DrawCall
impl Sync for DrawCall
impl Unpin for DrawCall
impl !UnwindSafe for DrawCall
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more