#[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.
Available Since: This struct is available since SDL 3.2.0.
See Also: SDL_GPUVertexAttribute See Also: SDL_GPUVertexInputRate
Fields§
§slot: Uint32< The binding slot of the vertex buffer.
pitch: Uint32< The size of a single element + the offset between elements.
input_rate: SDL_GPUVertexInputRate< Whether attribute addressing is a function of the vertex index or instance index.
instance_step_rate: Uint32< Reserved 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 more