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