diff --git a/WhatsNew.txt b/WhatsNew.txt index f8cd2aaa9..a0d065cc5 100644 --- a/WhatsNew.txt +++ b/WhatsNew.txt @@ -31,3 +31,5 @@ General: * SDL_stdinc.h no longer includes stdio.h, stdlib.h, etc., it only provides the SDL C runtime functionality * Added SDL_CreateSurface() and SDL_CreateSurfaceFrom() which replace the SDL_CreateRGBSurface*() * Removed unused 'flags' parameter from SDL_ConvertSurface and SDL_ConvertSurfaceFormat +* Removed 'SDL_GL_CONTEXT_EGL' from OpenGL configuration attributes + diff --git a/docs/README-migration.md b/docs/README-migration.md index c97a445c7..735d7c682 100644 --- a/docs/README-migration.md +++ b/docs/README-migration.md @@ -234,6 +234,11 @@ SDL_SetWindowBrightness and SDL_SetWindowGammaRamp have been removed from the AP Programs which have access to shaders can implement more robust versions of those functions using custom shader code rendered as a post-process effect. + +Removed 'SDL_GL_CONTEXT_EGL' from OpenGL configuration attributes +You can instead use 'SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_ES);' + + ## SDL_hints.h The following hints have been removed: diff --git a/include/SDL3/SDL_video.h b/include/SDL3/SDL_video.h index 8f811d410..cc1b87b41 100644 --- a/include/SDL3/SDL_video.h +++ b/include/SDL3/SDL_video.h @@ -256,7 +256,6 @@ typedef enum SDL_GL_RETAINED_BACKING, SDL_GL_CONTEXT_MAJOR_VERSION, SDL_GL_CONTEXT_MINOR_VERSION, - SDL_GL_CONTEXT_EGL, SDL_GL_CONTEXT_FLAGS, SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_SHARE_WITH_CURRENT_CONTEXT, diff --git a/src/video/SDL_video.c b/src/video/SDL_video.c index 1f610bf35..38cdaea7d 100644 --- a/src/video/SDL_video.c +++ b/src/video/SDL_video.c @@ -3565,14 +3565,6 @@ int SDL_GL_SetAttribute(SDL_GLattr attr, int value) case SDL_GL_CONTEXT_MINOR_VERSION: _this->gl_config.minor_version = value; break; - case SDL_GL_CONTEXT_EGL: - /* FIXME: SDL_GL_CONTEXT_EGL to be deprecated in SDL 2.1 */ - if (value != 0) { - SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_ES); - } else { - SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, 0); - } - break; case SDL_GL_CONTEXT_FLAGS: if (value & ~(SDL_GL_CONTEXT_DEBUG_FLAG | SDL_GL_CONTEXT_FORWARD_COMPATIBLE_FLAG | @@ -3783,16 +3775,6 @@ int SDL_GL_GetAttribute(SDL_GLattr attr, int *value) *value = _this->gl_config.minor_version; return 0; } - case SDL_GL_CONTEXT_EGL: - /* FIXME: SDL_GL_CONTEXT_EGL to be deprecated in SDL 2.1 */ - { - if (_this->gl_config.profile_mask == SDL_GL_CONTEXT_PROFILE_ES) { - *value = 1; - } else { - *value = 0; - } - return 0; - } case SDL_GL_CONTEXT_FLAGS: { *value = _this->gl_config.flags;