SDL_DestroyGPURenderState(3)

πŸ“¦
version 3.4.18 Β· 5 versions
, in fedora 43, fedora 44

πŸ’… SDL_DestroyGPURenderState πŸ’…

okay so bestie, welcome to the SDL3 FUNCTIONS section of the manual, and today we're talking about saying bye-bye to your custom GPU render state. yes, it's the cleanup era and honestly? iconic behavior. ✨


🌸 NAME 🌸

SDL_DestroyGPURenderState β€” destroy custom GPU render state. that's it. that's the whole vibe. she destroys, she slays, she frees. 🫢


πŸŽ€ SYNOPSIS πŸŽ€

#include <SDL3/SDL_render.h>

void SDL_DestroyGPURenderState(SDL_GPURenderState *state);

so you pull in the header from <SDL3/SDL_render.h> and then you hit it with the void. no return value, no drama, no notes. πŸ’…


πŸ¦‹ FUNCTION PARAMETERS πŸ¦‹

  • state β€” the state to destroy. like, the actual SDL_GPURenderState you want gone. hand her over and she's done for. πŸ“

🌈 THREAD SAFETY 🌈

okay this part is important so listen up fr fr:

This function should be called on the thread that created the renderer.

do NOT go destroying her from some random other thread, bestie. that's giving chaos. the thread that made the renderer is the thread that ends the render state. periodt. πŸ’€


⭐ AVAILABILITY ⭐

This function is available since SDL 3.4.0. so if you're on something older than that, she simply does not exist yet. no cap. 🧚


πŸ’œ SEE ALSO πŸ’œ


anyway, that's the page! go forth and free your render state, main character. 🌸

this lil manual moment came to you from the Simple Directmedia Layer, version SDL 3.4.18 β€” and yeah, the page itself is SDL_DestroyGPURenderState(3). mwah. πŸ’–πŸ’…

πŸ“¦ where this page comes from