sdlGlGetCurrentWindow function video

Pointer<SdlWindow> sdlGlGetCurrentWindow()

Get the currently active OpenGL window.

\returns the currently active OpenGL window on success or NULL on failure; call SDL_GetError() for more information.

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

\since This function is available since SDL 3.2.0.

extern SDL_DECLSPEC SDL_Window * SDLCALL SDL_GL_GetCurrentWindow(void)

Implementation

Pointer<SdlWindow> sdlGlGetCurrentWindow() {
  final sdlGlGetCurrentWindowLookupFunction = _libSdl
      .lookupFunction<
        Pointer<SdlWindow> Function(),
        Pointer<SdlWindow> Function()
      >('SDL_GL_GetCurrentWindow');
  return sdlGlGetCurrentWindowLookupFunction();
}