SDL 3.0
SDL_GPUVertexBufferDescription Struct Reference

#include <SDL_gpu.h>

Data Fields

Uint32 slot
 
Uint32 pitch
 
SDL_GPUVertexInputRate input_rate
 
Uint32 instance_step_rate
 

Detailed 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.

Since
This struct is available since SDL 3.1.3
See also
SDL_GPUVertexAttribute
SDL_GPUVertexInputState

Definition at line 1379 of file SDL_gpu.h.

Field Documentation

◆ input_rate

SDL_GPUVertexInputRate SDL_GPUVertexBufferDescription::input_rate

Whether attribute addressing is a function of the vertex index or instance index.

Definition at line 1383 of file SDL_gpu.h.

◆ instance_step_rate

Uint32 SDL_GPUVertexBufferDescription::instance_step_rate

The number of instances to draw using the same per-instance data before advancing in the instance buffer by one element. Ignored unless input_rate is SDL_GPU_VERTEXINPUTRATE_INSTANCE

Definition at line 1384 of file SDL_gpu.h.

◆ pitch

Uint32 SDL_GPUVertexBufferDescription::pitch

The byte pitch between consecutive elements of the vertex buffer.

Definition at line 1382 of file SDL_gpu.h.

◆ slot

Uint32 SDL_GPUVertexBufferDescription::slot

The binding slot of the vertex buffer.

Definition at line 1381 of file SDL_gpu.h.


The documentation for this struct was generated from the following file: