SDL_EGL_GetProcAddress(3)

πŸ’– SDL_EGL_GetProcAddress πŸ’–

okay bestie, so this one's from the SDL3 FUNCTIONS lineup β€” the SDL_EGL_GetProcAddress(3) page β€” and it's genuinely so useful if you're out here doing EGL stuff. let's get into it 🫢


✨ NAME ✨

SDL_EGL_GetProcAddress β€” get an EGL library function by name. yes, it's literally that. a little name-to-function vending machine πŸ’…


✨ SYNOPSIS ✨

#include <SDL3/SDL_video.h>

SDL_FunctionPointer SDL_EGL_GetProcAddress(const char *proc);

look at her. so simple. so clean. πŸŽ€


✨ DESCRIPTION ✨

so here's the tea πŸ“: if an EGL library is loaded, this function lets your application grab entry points for EGL functions. that's it, that's the whole vibe.

and why would you want that? because it's useful to provide to an EGL API and extension loader. like, that's the use case. that's who this is for. no cap. πŸ”₯


✨ FUNCTION PARAMETERS ✨

  • proc β€” the name of an EGL function. just the name, babe, that's all she needs 🌸

✨ RETURN VALUE ✨

it returns a pointer to the named EGL function ✨

heads up tho: the returned pointer should be cast to the appropriate function signature. like, SDL is handing you a generic pointer and going "here, you know what this actually is" 😭 so pls do the cast, don't just start calling it raw.

✨ THREAD SAFETY ✨

this function should only be called on the main thread 🧚 main character energy only. do not take it to a side thread, it will not slay there πŸ’€


✨ AVAILABILITY ✨

this function is available since SDL 3.2.0 πŸ‘‘


✨ SEE ALSO ✨


and that's the whole page, bestie!! πŸ’œ this one came to you from Simple Directmedia Layer, sitting pretty at version SDL 3.4.18. go forth and load your EGL entry points, you absolute icon πŸ¦‹βœ¨πŸ’…

πŸ“¦ where this page comes from