SDL_EGLAttribArrayCallback(3type)

SDL_EGLAttribArrayCallback3type

Egl platform attribute initialization callback.

Usage

#include "SDL3/SDL.h"

typedef SDL_EGLAttrib *(SDLCALL *SDL_EGLAttribArrayCallback)(void *userdata);

Header file

Defined in SDL3/SDL_video.h

Overview

This is called when SDL is attempting to create an EGL context, to let the app add extra attributes to its eglGetPlatformDisplay() call.

The callback should return a pointer to an EGL attribute array terminated with EGL_NONE . If this function returns NULL, the

SDL_CreateWindow
process will fail gracefully.

The returned pointer should be allocated with SDL_malloc () and will be passed to SDL_free ().

The arrays returned by each callback will be appended to the existing attribute arrays defined by SDL.

Function parameters

userdata

an app-controlled pointer that is passed to the callback.

Return value

Returns a newly-allocated array of attributes, terminated with EGL_NONE .

Availability

This datatype is available since SDL 3.2.0.

From libsdl3-doc 3.2.10+ds-1 in Debian 13 (Trixie). Parsed by carta from the page's man source.