#[repr(C)]pub struct SDL_GPUIndirectDrawCommand {
pub num_vertices: Uint32,
pub num_instances: Uint32,
pub first_vertex: Uint32,
pub first_instance: Uint32,
}Expand description
A structure specifying the parameters of an indirect draw command.
Note that the first_vertex and first_instance parameters are NOT
compatible with built-in vertex/instance ID variables in shaders (for
example, SV_VertexID); GPU APIs and shader languages do not define these
built-in variables consistently, so if your shader depends on them, the
only way to keep behavior consistent and portable is to always pass 0 for
the correlating parameter in the draw calls.
§Availability
This struct is available since SDL 3.2.0.
§See also
Fields§
§num_vertices: Uint32The number of vertices to draw.
num_instances: Uint32The number of instances to draw.
first_vertex: Uint32The index of the first vertex to draw.
first_instance: Uint32The ID of the first instance to draw.
Trait Implementations§
Source§impl Clone for SDL_GPUIndirectDrawCommand
impl Clone for SDL_GPUIndirectDrawCommand
Source§fn clone(&self) -> SDL_GPUIndirectDrawCommand
fn clone(&self) -> SDL_GPUIndirectDrawCommand
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SDL_GPUIndirectDrawCommand
impl Debug for SDL_GPUIndirectDrawCommand
Source§impl Default for SDL_GPUIndirectDrawCommand
impl Default for SDL_GPUIndirectDrawCommand
Source§fn default() -> SDL_GPUIndirectDrawCommand
fn default() -> SDL_GPUIndirectDrawCommand
Returns the “default value” for a type. Read more
Source§impl Hash for SDL_GPUIndirectDrawCommand
impl Hash for SDL_GPUIndirectDrawCommand
impl Copy for SDL_GPUIndirectDrawCommand
impl Eq for SDL_GPUIndirectDrawCommand
impl StructuralPartialEq for SDL_GPUIndirectDrawCommand
Auto Trait Implementations§
impl Freeze for SDL_GPUIndirectDrawCommand
impl RefUnwindSafe for SDL_GPUIndirectDrawCommand
impl Send for SDL_GPUIndirectDrawCommand
impl Sync for SDL_GPUIndirectDrawCommand
impl Unpin for SDL_GPUIndirectDrawCommand
impl UnwindSafe for SDL_GPUIndirectDrawCommand
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