We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 3423

Summary: SDL_EGL_CreateSurface fails with unsupported OpenGL ES versions (no matching config)
Product: SDL Reporter: ny00
Component: videoAssignee: Gabriel Jacobo <gabomdq>
Status: RESOLVED ABANDONED QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2    
Version: HG 2.0   
Hardware: All   
OS: Android (All)   

Description ny00 2016-09-14 20:21:20 UTC
So I got to install and run android-x86-5.1-rc1.iso in a VirtualBox session (using VirtualBox version 4.3.36-dfsg-1+deb8u1ubuntu1.14.04.1). OpenGL ES 2.0 doesn't seem to be usable there, with or without 3D acceleration being enabled, but 1.1 is doable.

The following limitation may apply to other setups using EGL.

Currently, SDL2 initializes the SDL_GL_CONTEXT_MAJOR_VERSION and SDL_GL_CONTEXT_MINOR_VERSION configuration attributes to 2 and 0, respectively. Furthermore, SDL_GL_CONTEXT_PROFILE_MASK is set to SDL_GL_CONTEXT_PROFILE_ES (on Android).

Thus, on an attempt to create a new window, I got the following calls chain, requesting OpenGL ES 2.0 at the end: SDL_CreateWindow -> SDL_EGL_CreateSurface -> SDL_EGL_ChooseConfig.

Problem is that OpenGL ES 2.0 is not supported on the given environment, so creation of window failed. While SDL_CreateRenderer may be able to iterate over different renderer drivers (e.g., "opengles2" and "opengles"), we don't yet have a window.


Current workaround (for a program using SDL2): If SDL_CreateWindow fails, set both SDL_GL_CONTEXT_MAJOR_VERSION and SDL_GL_CONTEXT_MINOR_VERSION to 1 and then retry.

Possible suggestion for a solution: Let SDL_GL_ResetAttributes mark each OpenGL configuration attribute as "reset" in some way, and unmark an attribute whenever it is modified outside SDL_GL_ResetAttributes.
Comment 1 Ryan C. Gordon 2018-08-06 21:20:19 UTC
Hello, and sorry if you're getting dozens of copies of this message by email.

We are closing out bugs that appear to be abandoned in some form. This can happen for lots of reasons: we couldn't reproduce it, conversation faded out, the bug was noted as fixed in a comment but we forgot to mark it resolved, the report is good but the fix is impractical, we fixed it a long time ago without realizing there was an associated report, etc.

Individually, any of these bugs might have a better resolution (such as WONTFIX or WORKSFORME or INVALID) but we've added a new resolution of ABANDONED to make this easily searchable and make it clear that it's not necessarily unreasonable to revive a given bug report.

So if this bug is still a going concern and you feel it should still be open: please feel free to reopen it! But unless you respond, we'd like to consider these bugs closed, as many of them are several years old and overwhelming our ability to prioritize recent issues.

(please note that hundred of bug reports were sorted through here, so we apologize for any human error. Just reopen the bug in that case!)

Thanks,
--ryan.