sdlGlGetCurrentContext function video

Pointer<SdlGlContext> sdlGlGetCurrentContext()

Get the currently active OpenGL context.

\returns the currently active OpenGL context 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.

\sa SDL_GL_MakeCurrent

extern SDL_DECLSPEC SDL_GLContext SDLCALL SDL_GL_GetCurrentContext(void)

Implementation

Pointer<SdlGlContext> sdlGlGetCurrentContext() {
  final sdlGlGetCurrentContextLookupFunction = _libSdl
      .lookupFunction<
        Pointer<SdlGlContext> Function(),
        Pointer<SdlGlContext> Function()
      >('SDL_GL_GetCurrentContext');
  return sdlGlGetCurrentContextLookupFunction();
}