SDL_SetGPURe...gmentUniforms(3)
β¨ 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 todataβ 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
- 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