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:
Ryan C. Gordon
2024-07-10 14:50:57 -04:00
parent 29b0076659
commit af2dbf3ff3
16 changed files with 34 additions and 24 deletions

View File

@@ -618,6 +618,7 @@
#define SDL_PATCHLEVEL SDL_MICRO_VERSION
/* ##SDL_video.h */
#define SDL_GL_DeleteContext SDL_GL_DestroyContext
#define SDL_GetClosestDisplayMode SDL_GetClosestFullscreenDisplayMode
#define SDL_GetDisplayOrientation SDL_GetCurrentDisplayOrientation
#define SDL_GetPointDisplayIndex SDL_GetDisplayForPoint
@@ -1215,6 +1216,7 @@
#define SDL_PATCHLEVEL SDL_PATCHLEVEL_renamed_SDL_MICRO_VERSION
/* ##SDL_video.h */
#define SDL_GL_DeleteContext SDL_GL_DeleteContext_renamed_SDL_GL_DestroyContext
#define SDL_GetClosestDisplayMode SDL_GetClosestDisplayMode_renamed_SDL_GetClosestFullscreenDisplayMode
#define SDL_GetDisplayOrientation SDL_GetDisplayOrientation_renamed_SDL_GetCurrentDisplayOrientation
#define SDL_GetPointDisplayIndex SDL_GetPointDisplayIndex_renamed_SDL_GetDisplayForPoint

View File

@@ -2592,7 +2592,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_GL_GetAttribute(SDL_GLattr attr, int *value)
*
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_GL_DeleteContext
* \sa SDL_GL_DestroyContext
* \sa SDL_GL_MakeCurrent
*/
extern SDL_DECLSPEC SDL_GLContext SDLCALL SDL_GL_CreateContext(SDL_Window *window);
@@ -2769,7 +2769,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_GL_SwapWindow(SDL_Window *window);
*
* \sa SDL_GL_CreateContext
*/
extern SDL_DECLSPEC int SDLCALL SDL_GL_DeleteContext(SDL_GLContext context);
extern SDL_DECLSPEC int SDLCALL SDL_GL_DestroyContext(SDL_GLContext context);
/* @} *//* OpenGL support functions */