SDL_EGL_GetWindowSurface(3)

πŸ’– SDL_EGL_GetWindowSurface(3) πŸ’–

okay bestie, welcome to the SDL3 FUNCTIONS section of the manual, and today's main character is SDL_EGL_GetWindowSurface(3). yes she has a whole page. she earned it. πŸŽ€


✨ NAME ✨

SDL_EGL_GetWindowSurface β€” grab the EGL surface that's vibing with your window. literally just hand it a window and it hands you back the surface. no cap. πŸ¦‹


✨ SYNOPSIS ✨

#include <SDL3/SDL_video.h>

SDL_EGLSurface SDL_EGL_GetWindowSurface(SDL_Window *window);

like. that's it. that's the whole summoning ritual. 🌸


✨ FUNCTION PARAMETERS ✨

  • window β€” the window you're asking about. the one you want the tea on. πŸ‘€

✨ RETURN VALUE ✨

returns the EGLSurface pointer that's linked up with the window, or NULL if it didn't work out. so like, check for NULL, bestie, don't just assume she showed up. πŸ’€


✨ THREAD SAFETY ✨

main thread only!! this function should only be called on the main thread. do not be out here calling her from some random thread, she will not answer and that's on you. πŸ™ˆ

✨ AVAILABILITY ✨

this function has been available since SDL 3.2.0. she's not new new, but she's not ancient either. iconic behavior. πŸ‘‘


and that's the whole page, bestie. go forth, query your window, get your surface. slay. πŸ’…

this has been your girl from Simple Directmedia Layer, running on SDL 3.4.18 β€” mwah, ily, see you in the next manpage. 🫢✨

πŸ“¦ where this page comes from