SDL_PUSHGPUFRAGMENTUNIFORMDATA(3)

πŸ’– NAME πŸ’–

SDL_PushGPUFragmentUniformData β€” bestie, this is the one that pushes data to a fragment uniform slot on the command buffer. 🫢


✨ SYNOPSIS ✨

#include <SDL3/SDL_gpu.h>

void SDL_PushGPUFragmentUniformData(
    SDL_GPUCommandBuffer *command_buffer,
    Uint32 slot_index,
    const void *data,
    Uint32 length);

🌸 DESCRIPTION 🌸

okay so here's the vibe: every draw call you make in this command buffer after you call this function is gonna use this uniform data. it's giving "set it once, everything downstream is obsessed with it." πŸ’…

🚨 IMPORTANT ALIGNMENT LORE, DO NOT SKIP: the data you push must respect std140 layout conventions. in practical terms that means you gotta make sure your vec3 and vec4 fields are 16-byte aligned. no cap. if you ignore this, that's on you, bestie. 😭

πŸŽ€ FUNCTION PARAMETERS πŸŽ€

  • command_buffer β€” a command buffer. yeah that's it, that's the whole description. she's simple like that. πŸ¦‹
  • slot_index β€” the fragment uniform slot you're pushing data to. pick your slot, queen. πŸ‘‘
  • data β€” client data to write.
  • length β€” the length of the data to write. literally just how much you're writing. ⭐

🌈 AVAILABILITY 🌈

this one's been around since SDL 3.2.0. iconic behavior fr fr. ✨


and that's the whole page, bestie β€” every flag, every param, every alignment warning, all of it, no details left behind. mwah. πŸ’–

signing off from the Simple Directmedia Layer girlies, SDL 3.4.18 era β€” catch you in the next SDL_PushGPUFragmentUniformData(3) manpage, iykyk πŸ§šβ€β™€οΈ

πŸ“¦ where this page comes from