SDL_DestroyWindowSurface(3)
π SDL_DestroyWindowSurface β the "bye bestie" button for your window's surface π
okay so real talk, this is one of those little functions from SDL3 FUNCTIONS that does exactly one thing and does it flawlessly. It's giving cleanup era. It's giving "we're done here, close the tab." π
β¨ NAME β¨
SDL_DestroyWindowSurface β literally just destroy the surface that's associated with the window. that's it. that's the whole job. no cap. π
β¨ SYNOPSIS β¨
#include <SDL3/SDL_video.h>
bool SDL_DestroyWindowSurface(SDL_Window *window);
she's short, she's sweet, she takes one pointer and returns a bool. iconic behavior honestly. πΈ
β¨ FUNCTION PARAMETERS β¨
windowβ the window to update. (yes bestie, the parameter doc really does say "to update", we don't ask questions, we just pass the window. π)
β¨ RETURN VALUE β¨
- Returns
trueon success, orfalseon failure. π«Ά - If it fails, pls pls pls call
SDL_GetError()for more information β that's where the tea is. π
β¨ THREAD SAFETY β¨
β οΈ bestie, listen. This function should only be called on the main thread. Not the side thread. Not your friend's thread. The main thread. periodt. π
β¨ AVAILABILITY β¨
This function is available since SDL 3.2.0. so if you're on something older, that's a you problem and you're gonna have to upgrade, sorry not sorry π
β¨ SEE ALSO β¨
the whole surface girlie friend group, we love a supportive squad π
and that's the whole page!! brought to you by Simple Directmedia Layer, version SDL 3.4.18, in this absolutely gorgeous SDL_DestroyWindowSurface(3) moment. go forth and destroy that surface responsibly, bestie π¦β¨π
π¦ where this page comes from
- fedora 43: SDL3-devel 3.4.18-1.fc43 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 43: SDL3-devel 3.4.18-1.fc43 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 44: SDL3-devel 3.4.18-1.fc44 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 44: SDL3-devel 3.4.18-1.fc44 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms