pub struct DrawArgs {
pub vertex_count: u32,
pub instance_count: u32,
pub first_vertex: u32,
pub first_instance: u32,
}Expand description
The four arguments of a non-indexed draw, as one value.
The non-indexed counterpart of DrawIndexedArgs, and the same
argument in the same order as draw(vertexCount, instanceCount, firstVertex, firstInstance).
Fields§
§vertex_count: u32The number of vertices to draw, taken from the bound vertex buffers as a non-indexed stream.
instance_count: u32How many instances of the geometry to draw. 1 draws a single
instance.
first_vertex: u32The vertex to start from, for drawing a sub-range of the vertex stream.
first_instance: u32The first instance index, for reading per-instance attributes from an offset.
Implementations§
Source§impl DrawArgs
Named constructors for the draw-argument structs, whose derived new
skips every field and therefore takes no arguments.
impl DrawArgs
Named constructors for the draw-argument structs, whose derived new
skips every field and therefore takes no arguments.
Source§impl DrawArgs
impl DrawArgs
pub fn get_vertex_count(&self) -> u32
pub fn set_vertex_count(&mut self, val: u32) -> &mut Self
pub fn get_instance_count(&self) -> u32
pub fn set_instance_count(&mut self, val: u32) -> &mut Self
pub fn get_first_vertex(&self) -> u32
pub fn set_first_vertex(&mut self, val: u32) -> &mut Self
pub fn get_first_instance(&self) -> u32
pub fn set_first_instance(&mut self, val: u32) -> &mut Self
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DrawArgs
impl RefUnwindSafe for DrawArgs
impl Send for DrawArgs
impl Sync for DrawArgs
impl Unpin for DrawArgs
impl UnsafeUnpin for DrawArgs
impl UnwindSafe for DrawArgs
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