sdlEglSetAttributeCallbacks function

void sdlEglSetAttributeCallbacks(
  1. Pointer<NativeFunction<SdlEglAttribArrayCallback>> platformAttribCallback,
  2. Pointer<NativeFunction<SdlEglIntArrayCallback>> surfaceAttribCallback,
  3. Pointer<NativeFunction<SdlEglIntArrayCallback>> contextAttribCallback,
  4. Pointer<NativeType> userdata,
)

Sets the callbacks for defining custom EGLAttrib arrays for EGL initialization.

Callbacks that aren't needed can be set to NULL.

NOTE: These callback pointers will be reset after SDL_GL_ResetAttributes.

\param platformAttribCallback callback for attributes to pass to eglGetPlatformDisplay. May be NULL. \param surfaceAttribCallback callback for attributes to pass to eglCreateSurface. May be NULL. \param contextAttribCallback callback for attributes to pass to eglCreateContext. May be NULL. \param userdata a pointer that is passed to the callbacks.

\threadsafety This function should only be called on the main thread.

\since This function is available since SDL 3.1.3.

extern SDL_DECLSPEC void SDLCALL SDL_EGL_SetAttributeCallbacks(SDL_EGLAttribArrayCallback platformAttribCallback, SDL_EGLIntArrayCallback surfaceAttribCallback, SDL_EGLIntArrayCallback contextAttribCallback, void *userdata)

Implementation

void sdlEglSetAttributeCallbacks(
    Pointer<NativeFunction<SdlEglAttribArrayCallback>> platformAttribCallback,
    Pointer<NativeFunction<SdlEglIntArrayCallback>> surfaceAttribCallback,
    Pointer<NativeFunction<SdlEglIntArrayCallback>> contextAttribCallback,
    Pointer<NativeType> userdata) {
  final sdlEglSetAttributeCallbacksLookupFunction = libSdl3.lookupFunction<
      Void Function(
          Pointer<NativeFunction<SdlEglAttribArrayCallback>>
              platformAttribCallback,
          Pointer<NativeFunction<SdlEglIntArrayCallback>> surfaceAttribCallback,
          Pointer<NativeFunction<SdlEglIntArrayCallback>> contextAttribCallback,
          Pointer<NativeType> userdata),
      void Function(
          Pointer<NativeFunction<SdlEglAttribArrayCallback>>
              platformAttribCallback,
          Pointer<NativeFunction<SdlEglIntArrayCallback>> surfaceAttribCallback,
          Pointer<NativeFunction<SdlEglIntArrayCallback>> contextAttribCallback,
          Pointer<NativeType> userdata)>('SDL_EGL_SetAttributeCallbacks');
  return sdlEglSetAttributeCallbacksLookupFunction(platformAttribCallback,
      surfaceAttribCallback, contextAttribCallback, userdata);
}