SDL_CreateGPUSampler(3)

πŸ’– SDL_CreateGPUSampler(3) β€” SDL3 FUNCTIONS πŸ’–

okay bestie, so this is a page from the SDL3 FUNCTIONS manual, and it's about SDL_CreateGPUSampler β€” literally the girlboss that makes you a sampler object. πŸŽ€


✨ NAME ✨

SDL_CreateGPUSampler β€” creates a sampler object to be used when binding textures in a graphics workflow. no cap, that's the whole job. πŸ¦‹


🌸 SYNOPSIS 🌸

#include <SDL3/SDL_gpu.h>

SDL_GPUSampler * SDL_CreateGPUSampler(
    SDL_GPUDevice *device,
    const SDL_GPUSamplerCreateInfo *createinfo);

πŸ’… DESCRIPTION πŸ’…

So here's the tea: there are optional properties you can hand over through props. These are the supported properties: πŸ‘‘

  • SDL_PROP_GPU_SAMPLER_CREATE_NAME_STRING β€” a name that can be displayed in debugging tools. it's giving "name tag at the function party", and it's highkey useful when you're debugging. πŸ’œ

🫢 FUNCTION PARAMETERS 🫢

  • device β€” a GPU Context. your whole entire GPU situation, basically. πŸ–₯️✨
  • createinfo β€” a struct describing the state of the sampler to create. like, tell it what vibe you want and it'll build it. 🌈

😭 RETURN VALUE 😭

Returns a sampler object on success, or NULL on failure. if it flops, call SDL_GetError() for more information β€” she will tell you exactly what went wrong, fr fr. πŸ’€


⭐ AVAILABILITY ⭐

This function is available since SDL 3.2.0. so if you're on something older... bestie, no. πŸ™ˆ


πŸ‘‘ SEE ALSO πŸ‘‘


ngl, don't forget to release your sampler when you're done with it β€” main character energy means cleaning up after yourself. πŸ’–

mwah πŸ’‹ that's the whole page, brought to you by Simple Directmedia Layer, version SDL 3.4.18 πŸ¦‹βœ¨ β€” go slay some textures, bestie, and remember: samplers don't grow on trees, they grow from SDL_CreateGPUSampler. periodt. πŸ’…πŸŽ€

πŸ“¦ where this page comes from