SDL_BINDGPUFRAGMENTSTORAGETEXTURES(3)
π SDL_BindGPUFragmentStorageTextures π
okay bestie, welcome to the SDL3 FUNCTIONS corner of the man pages, where we're talking about SDL_BindGPUFragmentStorageTextures β the girl whose whole job is hooking your storage textures up to the fragment shader. she's giving backstage pass energy. β¨
πΈ NAME πΈ
SDL_BindGPUFragmentStorageTextures β Binds storage textures for use on the fragment shader.
π SYNOPSIS π
#include <SDL3/SDL_gpu.h>
void SDL_BindGPUFragmentStorageTextures(
SDL_GPURenderPass *render_pass,
Uint32 first_slot,
SDL_GPUTexture *const *storage_textures,
Uint32 num_bindings);
π¦ DESCRIPTION π¦
so here's the tea, bestie π β these textures must have been created with SDL_GPU_TEXTUREUSAGE_GRAPHICS_STORAGE_READ. that's not a suggestion, that's the vibe check, and they have to pass it.
the textures you're binding also need a matching type declared in the shader (2D, 3D, 2DMS, etc.). like, your shader has to actually be expecting the shape you're handing it. mismatched types? it's giving chaos. π
and fr fr, be sure your shader is set up according to the requirements documented in SDL_CreateGPUShader(). that's the main character of this whole storyline, iykyk.
π FUNCTION PARAMETERS π
render_passβ a render pass handle. the venue for the whole operation πfirst_slotβ the fragment storage texture slot to begin binding from. where in the lineup we start, no cap.storage_texturesβ an array of storage textures. the whole squad, in order. π«Άnum_bindingsβ the number of storage textures to bind from the array. how many besties are actually walking in. β¨
β AVAILABILITY β
this function is available since SDL 3.2.0. iconic behavior, honestly.
π SEE ALSO π
SDL_CreateGPUShader(3)β go read her, she has the rules. periodt. π
ngl, if you skip the SDL_CreateGPUShader() docs you are setting yourself up. don't do that to yourself, bestie. π
Simple Directmedia Layer Β· version SDL 3.4.18 β mwah, thanks for reading, slay, go bind some textures πβ¨π
π¦ 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