sdlGlDestroyContext function video

bool sdlGlDestroyContext(
  1. Pointer<SdlGlContext> context
)

Delete an OpenGL context.

\param context the OpenGL context to be deleted. \returns true on success or false 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_CreateContext

extern SDL_DECLSPEC bool SDLCALL SDL_GL_DestroyContext(SDL_GLContext context)

Implementation

bool sdlGlDestroyContext(Pointer<SdlGlContext> context) {
  final sdlGlDestroyContextLookupFunction = _libSdl
      .lookupFunction<
        Uint8 Function(Pointer<SdlGlContext> context),
        int Function(Pointer<SdlGlContext> context)
      >('SDL_GL_DestroyContext');
  return sdlGlDestroyContextLookupFunction(context) == 1;
}