mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-10-02 07:58:30 +00:00
video: Rename SDL_GL_DeleteContext to SDL_GL_DestroyContext.
Turns out that there isn't a strong OpenGL naming convention for "Delete" ... WGL offers "wglDeleteContext" but the GLX equivalent is "glxDestroyContext" and then EGL sealed the deal by going with Destroy as well! Since it matches SDL3 naming conventions (Create/Destroy), we're renaming it. Fixes #10197.
This commit is contained in:
@@ -1578,7 +1578,7 @@ static void GL_DestroyRenderer(SDL_Renderer *renderer)
|
||||
SDL_free(data->framebuffers);
|
||||
data->framebuffers = nextnode;
|
||||
}
|
||||
SDL_GL_DeleteContext(data->context);
|
||||
SDL_GL_DestroyContext(data->context);
|
||||
}
|
||||
SDL_free(data);
|
||||
}
|
||||
@@ -1686,12 +1686,12 @@ static int GL_CreateRenderer(SDL_Renderer *renderer, SDL_Window *window, SDL_Pro
|
||||
goto error;
|
||||
}
|
||||
if (SDL_GL_MakeCurrent(window, data->context) < 0) {
|
||||
SDL_GL_DeleteContext(data->context);
|
||||
SDL_GL_DestroyContext(data->context);
|
||||
goto error;
|
||||
}
|
||||
|
||||
if (GL_LoadFunctions(data) < 0) {
|
||||
SDL_GL_DeleteContext(data->context);
|
||||
SDL_GL_DestroyContext(data->context);
|
||||
goto error;
|
||||
}
|
||||
|
||||
@@ -1807,7 +1807,7 @@ static int GL_CreateRenderer(SDL_Renderer *renderer, SDL_Window *window, SDL_Pro
|
||||
SDL_GL_GetProcAddress("glCheckFramebufferStatusEXT");
|
||||
} else {
|
||||
SDL_SetError("Can't create render targets, GL_EXT_framebuffer_object not available");
|
||||
SDL_GL_DeleteContext(data->context);
|
||||
SDL_GL_DestroyContext(data->context);
|
||||
goto error;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user