#[repr(C)]pub struct SDL_GPUVertexBufferDescription {
pub slot: Uint32,
pub pitch: Uint32,
pub input_rate: SDL_GPUVertexInputRate,
pub instance_step_rate: Uint32,
}Expand description
A structure specifying the parameters of vertex buffers used in a graphics pipeline.
When you call SDL_BindGPUVertexBuffers, you specify the binding slots of
the vertex buffers. For example if you called SDL_BindGPUVertexBuffers with
a first_slot of 2 and num_bindings of 3, the binding slots 2, 3, 4 would be
used by the vertex buffers you pass in.
Vertex attributes are linked to buffers via the buffer_slot field of
SDL_GPUVertexAttribute. For example, if an attribute has a buffer_slot of
0, then that attribute belongs to the vertex buffer bound at slot 0.
§Availability
This struct is available since SDL 3.2.0.
§See also
Fields§
§slot: Uint32The binding slot of the vertex buffer.
pitch: Uint32The size of a single element + the offset between elements.
input_rate: SDL_GPUVertexInputRateWhether attribute addressing is a function of the vertex index or instance index.
instance_step_rate: Uint32Reserved for future use. Must be set to 0.
Trait Implementations§
Source§impl Clone for SDL_GPUVertexBufferDescription
impl Clone for SDL_GPUVertexBufferDescription
Source§fn clone(&self) -> SDL_GPUVertexBufferDescription
fn clone(&self) -> SDL_GPUVertexBufferDescription
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Default for SDL_GPUVertexBufferDescription
impl Default for SDL_GPUVertexBufferDescription
Source§fn default() -> SDL_GPUVertexBufferDescription
fn default() -> SDL_GPUVertexBufferDescription
Source§impl PartialEq for SDL_GPUVertexBufferDescription
impl PartialEq for SDL_GPUVertexBufferDescription
Source§fn eq(&self, other: &SDL_GPUVertexBufferDescription) -> bool
fn eq(&self, other: &SDL_GPUVertexBufferDescription) -> bool
self and other values to be equal, and is used by ==.