SDL_EGL_SETATTRIBUTECALLBACKS(3)
β¨ SDL_EGL_SetAttributeCallbacks β¨
okay bestie, welcome to the SDL3 FUNCTIONS corner of the manual, where today's main character is SDL_EGL_SetAttributeCallbacks(3) π
she's the one who lets you hand SDL your very own custom EGLAttrib arrays for EGL init. lowkey powerful, ngl.
πΈ NAME πΈ
SDL_EGL_SetAttributeCallbacks β sets the callbacks for defining custom EGLAttrib arrays for EGL initialization. it's giving "you're in charge of the attribute list now" π
π¦ SYNOPSIS π¦
#include <SDL3/SDL_video.h>
void SDL_EGL_SetAttributeCallbacks(SDL_EGLAttribArrayCallback platformAttribCallback,
SDL_EGLIntArrayCallback surfaceAttribCallback,
SDL_EGLIntArrayCallback contextAttribCallback, void *userdata);
like, copy that character for character, no cap. π
π DESCRIPTION π
so here's the tea: callbacks that aren't needed can be set to NULL. fr fr, just pass NULL and move on with your life. β¨
NOTE: These callback pointers will be reset after SDL_GL_ResetAttributes. π so don't come crying to me when your cute little callbacks vanish β that's just the documented behaviour, bestie.
π FUNCTION PARAMETERS π
platformAttribCallbackβ callback for attributes to pass toeglGetPlatformDisplay. May beNULL. optional queen π«ΆsurfaceAttribCallbackβ callback for attributes to pass toeglCreateSurface. May beNULL. also optional, slay πcontextAttribCallbackβ callback for attributes to pass toeglCreateContext. May beNULL. yep, optional too βuserdataβ a pointer that is passed to the callbacks. your lil carry-on bag, hand-delivered to every callback π
π₯ THREAD SAFETY π₯
This function should only be called on the main thread. periodt. don't be chaotic about it. π
π AVAILABILITY π
This function is available since SDL 3.2.0. π she's been around, she's established, she ate.
and that's the whole vibe check, bestie β go forth and customize those EGL attrib arrays responsibly ππ§
this lil love letter to your terminal comes straight from Simple Directmedia Layer, SDL 3.4.18, and the page is literally called SDL_EGL_SetAttributeCallbacks(3) β mwah, bye bye π
β¨
π¦ 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