SDL_BindGPUV...torageBuffers(3)

✨ SDL_BindGPUVertexStorageBuffers ✨

okay bestie, so this one lives in the SDL3 FUNCTIONS section of the manual, and it's literally about handing your vertex shader the storage buffers it's gonna read from. let's get into it 🫢


πŸ’– NAME πŸ’–

SDL_BindGPUVertexStorageBuffers β€” binds storage buffers for use on the vertex shader.


🌸 SYNOPSIS 🌸

#include <SDL3/SDL_gpu.h>

void SDL_BindGPUVertexStorageBuffers(
    SDL_GPURenderPass *render_pass,
    Uint32 first_slot,
    SDL_GPUBuffer *const *storage_buffers,
    Uint32 num_bindings);

πŸ¦‹ DESCRIPTION πŸ¦‹

so the tea is: these buffers must have been created with SDL_GPU_BUFFERUSAGE_GRAPHICS_STORAGE_READ. no exceptions, no workarounds, the vibe check happens at creation time πŸŽ€

and pls pls pls be sure your shader is set up according to the requirements documented in SDL_CreateGPUShader(). like, actually read that one. it matters. iykyk πŸ’…


πŸ‘‘ FUNCTION PARAMETERS πŸ‘‘

  • render_pass β€” a render pass handle. this is your lil main character, the pass you're binding into.
  • first_slot β€” the vertex storage buffer slot to begin binding from.
  • storage_buffers β€” an array of buffers. yes, an array. bring the whole squad 🧚
  • num_bindings β€” the number of buffers to bind from the array.

⭐ AVAILABILITY ⭐

this function is available since SDL 3.2.0. if you're on something older... girl, upgrade 😭


🌈 SEE ALSO 🌈


and that's the whole page, bestie. go bind those buffers, you're gonna slay πŸ”₯

πŸ’– this has been your friendly neighbourhood rewrite of the Simple Directmedia Layer manpage, SDL 3.4.18, originally dated with the page name SDL_BindGPUV...torageBuffers(3) β€” mwah, periodt πŸ’…βœ¨

πŸ“¦ where this page comes from