SDL_GL_DestroyContext(3)
π SDL_GL_DestroyContext β from the SDL3 FUNCTIONS era π
okay bestie, welcome to the SDL3 FUNCTIONS corner of the man pages, where we handle OpenGL contexts and we handle them correctly. today's main character is SDL_GL_DestroyContext, and yes she does exactly what it says on the tin.
β¨ NAME β¨
SDL_GL_DestroyContext β delete an OpenGL context. that's it. that's the whole job. she's a closer, not a builder. π
π¦ SYNOPSIS π¦
#include <SDL3/SDL_video.h>
bool SDL_GL_DestroyContext(SDL_GLContext context);
look at her. one argument. no drama. no cap. πΈ
π FUNCTION PARAMETERS π
contextβ the OpenGL context that is going bye-bye. the one getting deleted. hand her over and let her go, bestie. π«Ά
π RETURN VALUE π
returns true on success or false on failure. and if it fails? do not just sit there wondering, girl β call SDL_GetError() for more information. she'll tell you what went wrong, fr fr. π
π§ THREAD SAFETY π§
β οΈ this function should only be called on the main thread.
read that again. main thread only. no side-quest threads, no sneaky background thread energy. main character only, periodt. π
π AVAILABILITY π
this function is available since SDL 3.2.0. if you're on something older, she's not there yet, and no amount of manifesting will summon her. β¨
β SEE ALSO β
SDL_GL_CreateContext(3)β the one who makes the context. the origin story. the prequel. π₯
and that's the whole page, bestie. go forth, destroy your contexts responsibly, and remember: you created her, so you close her. π
Simple Directmedia Layer Β· SDL 3.4.18 β mwah, love u, see u in the next man page πππ¦
π¦ 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