SDL_HINT_EGL_LIBRARY(3)
π SDL_HINT_EGL_LIBRARY π
okay bestie, welcome to the SDL3 FUNCTIONS corner of the manual, and today's main character is a lil hint macro that decides which EGL library we're loading. she's small, she's powerful, she's lowkey the reason your OpenGL window even exists. let's get into it π«Ά
β¨ NAME β¨
SDL_HINT_EGL_LIBRARY β specify the EGL library to load. that's it, that's the whole vibe. π
πΈ SYNOPSIS πΈ
#include <SDL3/SDL_hints.h>
#define SDL_HINT_EGL_LIBRARY "SDL_EGL_LIBRARY"
no cap, that's the entire interface. one include, one define. iconic behaviour honestly. π
π¦ DESCRIPTION π¦
so here's the tea, bestie. π
You set this hint before you create an OpenGL window, or before you create an OpenGL context. Timing matters, okay?? not me stressing the order, it genuinely does.
Now β and this is the important part β this hint is only considered if SDL is using EGL to manage OpenGL contexts. so if SDL isn't going down the EGL route, she's not even reading this hint. she's not ignoring you, she just literally cannot see you. π
And if you don't set this hint at all? totally fine. SDL will choose a reasonable default for you. she's got you. she always has. β¨
β AVAILABILITY β
this hint has been available since SDL 3.2.0. so if you're on anything older... bestie. we need to talk. π
π that's the whole page π
short and sweet, just like this one. go forth and let SDL pick the default, or flex your EGL library choice like the main character you are. either way, slay. π
reminder that this hint is only in the room when SDL is using EGL for OpenGL contexts, and that it needs to be set before the window or context gets created. no exceptions, iykyk. π
Simple Directmedia Layer πΈ SDL 3.4.18 β mwah, kisses from the SDL_HINT_EGL_LIBRARY(3) page. periodt. π β¨
π¦ 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