SDL_GPUTEXTURESAMPLERBINDING(3type)

✨ NAME ✨

SDL_GPUTextureSamplerBinding β€” bestie, this is the struct that holds all the params for a sampler binding call πŸ’– it's from the SDL3 DATATYPES crew, and we're gonna get you so comfy with it.


πŸŽ€ SYNOPSIS πŸŽ€

#include <SDL3/SDL_gpu.h>

typedef struct SDL_GPUTextureSamplerBinding
{
    SDL_GPUTexture *texture;  /**< The texture to bind. Must have been created with SDL_GPU_TEXTUREUSAGE_SAMPLER. */
    SDL_GPUSampler *sampler;  /**< The sampler to bind. */
} SDL_GPUTextureSamplerBinding;

okay so it's literally just two pointers and that's the whole vibe. no cap. let's break it down πŸ¦‹

  • SDL_GPUTexture *texture β€” the texture you're binding. IMPORTANT: it must have been created with SDL_GPU_TEXTUREUSAGE_SAMPLER, no exceptions, she checks the receipts πŸ’…
  • SDL_GPUSampler *sampler β€” the sampler you're binding. that's it. that's the field πŸŽ€

🌸 AVAILABILITY 🌸

this gorgeous lil struct has been on the scene since SDL 3.2.0 πŸ‘‘ so if you're on anything older, she is not there, and that's on periodt.


πŸ’œ SEE ALSO πŸ’œ

go read these next, bestie, they're all connected iykyk:


and that's the whole page!! this came to you from Simple Directmedia Layer, living its best life as part of SDL 3.4.18 ✨ mwah, go bind some textures, you're gonna slay πŸ«ΆπŸ’–

πŸ“¦ where this page comes from