SDL_SetGPURe...gmentUniforms(3)

πŸ“¦
version 3.4.18 Β· 5 versions
, in fedora 43, fedora 44

✨ NAME ✨

SDL_SetGPURenderStateFragmentUniforms β€” bestie, this one sets fragment shader uniform variables inside a custom GPU render state πŸ’…

Oh and hi, you're in the SDL3 FUNCTIONS section of the manual, iykyk πŸŽ€


🌸 SYNOPSIS 🌸

#include <SDL3/SDL_render.h>

bool SDL_SetGPURenderStateFragmentUniforms(SDL_GPURenderState *state, Uint32 slot_index, const void *data, Uint32 length);

πŸ’– DESCRIPTION πŸ’–

Okay so here's the tea: the data gets copied, and then it's gonna be pushed using SDL_PushGPUFragmentUniformData() while the draw call is executing. No cap, that's literally the whole vibe πŸ”₯


πŸ¦‹ FUNCTION PARAMETERS πŸ¦‹

  • state β€” the state you wanna modify, queen πŸ‘‘
  • slot_index β€” the fragment uniform slot you're pushing data to
  • data β€” the client data to write ✍️
  • length β€” how long the data you're writing is

⭐ RETURN VALUE ⭐

Returns true when it slays, or false when it... doesn't 😭 If it's a fail, call SDL_GetError() for more info, fr fr.


🌈 THREAD SAFETY 🌈

Call this function on the thread that created the renderer. Not any thread. That thread. Main character thread energy only 🫢


✨ AVAILABILITY ✨

This function has been available since SDL 3.4.0 πŸ’–


Heads up bestie: this page is from the Simple Directmedia Layer crew, SDL 3.4.18, and the page you're reading is SDL_SetGPURe...gmentUniforms(3) β€” yeah the name got cut off, she's a long one 😭 stay iconic, mwah πŸ’…πŸŽ€πŸ¦‹
πŸ“¦ where this page comes from