SDL_ReleaseGPUSampler(3)

πŸ’– SDL_ReleaseGPUSampler πŸ’–

ok so bestie, this one lives in the SDL3 FUNCTIONS part of the manual, and it's giving "bye girl, you're done here" energy. πŸŽ€

✨ NAME ✨

SDL_ReleaseGPUSampler β€” frees the given sampler as soon as it is safe to do so. πŸ¦‹


🌸 SYNOPSIS 🌸

#include <SDL3/SDL_gpu.h>

void SDL_ReleaseGPUSampler(
    SDL_GPUDevice *device,
    SDL_GPUSampler *sampler);

like look at that signature. two args. no return value. she simply does her job and leaves. πŸ‘‘


πŸ’… DESCRIPTION πŸ’…

ok so this is the important part and I need you to really hear me on this one:

You must not reference the sampler after calling this function.

not a vibe check, not a suggestion, not "maybe just once real quick". do not touch it after. it's gone. referencing it after this call is not the move, bestie. 😭


🫢 FUNCTION PARAMETERS 🫢

  • device β€” a GPU context. that's the whole thing, that's the description, she's a GPU context periodt. πŸ’œ
  • sampler β€” a sampler to be destroyed. yeah. we're releasing her. it's her time. 🌈

⭐ AVAILABILITY ⭐

this function is available since SDL 3.2.0. so if you're on anything older, it's not there, and no amount of manifesting will make it appear. ✨


so yeah, that's the whole page fr fr. call it, and then never speak her name again. main character exit. πŸ’€πŸŒΈ

sign-off time: this lil page comes to you from Simple Directmedia Layer, sitting pretty at SDL 3.4.18, and yeah the footer is literally just the same page name again (SDL_ReleaseGPUSampler(3)) β€” the manpage equivalent of tagging yourself in the group chat. πŸŽ€πŸ’– no cap.

πŸ“¦ where this page comes from