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:


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