sdlGlDestroyContext function

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.1.3.

\sa SDL_GL_CreateContext

extern SDL_DECLSPEC bool SDLCALL SDL_GL_DestroyContext(SDL_GLContext context)

Implementation

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