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:
1 parent
29b0076659
commit
af2dbf3ff3
16 files changed
+34
-24
No files matched your search
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -1440,7 +1440,7 @@ static void GLES2_DestroyRenderer(SDL_Renderer *renderer)
|
||||
GL_CheckError("", renderer);
|
||||
#endif
|
||||
|
||||
SDL_GL_DeleteContext(data->context);
|
||||
SDL_GL_DestroyContext(data->context);
|
||||
}
|
||||
|
||||
SDL_free(data);
|
||||
@@ -2107,17 +2107,17 @@ static int GLES2_CreateRenderer(SDL_Renderer *renderer, SDL_Window *window, SDL_
|
||||
goto error;
|
||||
}
|
||||
if (SDL_GL_MakeCurrent(window, data->context) < 0) {
|
||||
SDL_GL_DeleteContext(data->context);
|
||||
SDL_GL_DestroyContext(data->context);
|
||||
goto error;
|
||||
}
|
||||
|
||||
if (GLES2_LoadFunctions(data) < 0) {
|
||||
SDL_GL_DeleteContext(data->context);
|
||||
SDL_GL_DestroyContext(data->context);
|
||||
goto error;
|
||||
}
|
||||
|
||||
if (GLES2_CacheShaders(data) < 0) {
|
||||
SDL_GL_DeleteContext(data->context);
|
||||
SDL_GL_DestroyContext(data->context);
|
||||
goto error;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user