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 🌈


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