SDL_GPUVertexInputState(3type)
π SDL_GPUVertexInputState π
okay bestie, so this is a page from the SDL3 DATATYPES manual β like, the datatypes corner of the SDL3 docs β and today's main character is SDL_GPUVertexInputState. It's a structure that specifies the parameters of a graphics pipeline vertex input state. Yes, that's a whole mouthful, but lowkey it's just the lil' bundle that tells the GPU "hey, here's how the vertex data is laid out, k?"
β¨ NAME β¨
SDL_GPUVertexInputState β a structure specifying the parameters of a graphics pipeline vertex input state. it's giving "here's where your vertices live and what they look like." π¦
πΈ SYNOPSIS πΈ
#include <SDL3/SDL_gpu.h>
typedef struct SDL_GPUVertexInputState
{
const SDL_GPUVertexBufferDescription *vertex_buffer_descriptions; /**< A pointer to an array of vertex buffer descriptions. */
Uint32 num_vertex_buffers; /**< The number of vertex buffer descriptions in the above array. */
const SDL_GPUVertexAttribute *vertex_attributes; /**< A pointer to an array of vertex attribute descriptions. */
Uint32 num_vertex_attributes; /**< The number of vertex attribute descriptions in the above array. */
} SDL_GPUVertexInputState;
no cap, that's the whole struct. four fields, zero drama. let's break them down π
vertex_buffer_descriptionsβ a pointer to an array of vertex buffer descriptions. (the vibes of each buffer)num_vertex_buffersβ the number of vertex buffer descriptions in the above array. (how many of those you actually got)vertex_attributesβ a pointer to an array of vertex attribute descriptions. (the individual pieces of data inside those buffers)num_vertex_attributesβ the number of vertex attribute descriptions in the above array. (and how many of those)
π AVAILABILITY π
this struct is available since SDL 3.2.0. periodt. π
π SEE ALSO π
go read these next, bestie, they're the whole squad:
SDL_GPUGraphicsPipelineCreateInfo(3type)SDL_GPUVertexBufferDescription(3type)SDL_GPUVertexAttribute(3type)
mwah π that's the page!! brought to you by Simple Directmedia Layer, SDL 3.4.18, dated with the SDL_GPUVertexInputState(3type) energy it deserves. now go slay those vertex buffers fr fr π«Άβ¨
π¦ where this page comes from
- fedora 43: SDL3-devel 3.4.18-1.fc43 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 43: SDL3-devel 3.4.18-1.fc43 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 44: SDL3-devel 3.4.18-1.fc44 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 44: SDL3-devel 3.4.18-1.fc44 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms