pub struct DrawIndexedArgs {
pub index_count: u32,
pub instance_count: u32,
pub first_index: u32,
pub base_vertex: i32,
pub first_instance: u32,
}Expand description
The five arguments of an indexed draw, as one value.
drawIndexed and drawIndexedOffset take these as five positional
arguments today, with no named parameter in between to keep them in
order and no way to leave a trailing one at its default. Grouping them
makes the call self-documenting and lets a caller vary one of the five
without restating the other four.
Fields§
§index_count: u32The number of indices to read from the bound index buffer.
instance_count: u32How many instances of the indexed geometry to draw. 1 draws a
single instance.
first_index: u32The index of the first index to read, for drawing a sub-range of the index buffer.
base_vertex: i32The value added to every index before it is used to fetch a vertex. Lets several meshes share one vertex buffer.
first_instance: u32The first instance index, for reading per-instance attributes from an offset.
Implementations§
Source§impl DrawIndexedArgs
Named constructors for the draw-argument structs.
impl DrawIndexedArgs
Named constructors for the draw-argument structs.