mirror of
https://github.com/Relintai/sdl2_frt.git
synced 2024-12-16 11:06:49 +01:00
render: GL_DestroyRender() should activate first.
Otherwise, we might destroy a different GL context's resources.
This commit is contained in:
parent
cff9e5a876
commit
02773811b3
@ -1523,6 +1523,11 @@ GL_DestroyRenderer(SDL_Renderer * renderer)
|
||||
GL_RenderData *data = (GL_RenderData *) renderer->driverdata;
|
||||
|
||||
if (data) {
|
||||
if (data->context != NULL) {
|
||||
/* make sure we delete the right resources! */
|
||||
GL_ActivateRenderer(renderer);
|
||||
}
|
||||
|
||||
GL_ClearErrors(renderer);
|
||||
if (data->GL_ARB_debug_output_supported) {
|
||||
PFNGLDEBUGMESSAGECALLBACKARBPROC glDebugMessageCallbackARBFunc = (PFNGLDEBUGMESSAGECALLBACKARBPROC) SDL_GL_GetProcAddress("glDebugMessageCallbackARB");
|
||||
|
Loading…
Reference in New Issue
Block a user