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:
parent
29b0076659
commit
af2dbf3ff3
16 changed files with 34 additions and 24 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue