| Summary: | Common EGL code [patch] | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Gabriel Jacobo <gabomdq> |
| Component: | video | Assignee: | Sam Lantinga <slouken> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | ||
| Version: | HG 2.0 | ||
| Hardware: | All | ||
| OS: | All | ||
| Attachments: |
egl v1
egl v2 egl v3 |
||
Created attachment 1287 [details]
egl v2
The attached patch improves the X11 OpenGL backend. It will check if the GLX_EXT_create_context_es2_profile extension is present (as is the case with Nvidia binaries), and use GLX to create a ES/ES2 context instead of EGL which provides a software implementation when using these drivers.
It also separates the GL ES/ES2 logic from the EGL logic a bit (more work is needed though, see bug ). Currently the X11 backend mostly assumes EGL=OpenGL ES, when this is not always the case (for example, in the case of Nvidia binaries mentioned above).
Ideally, I think the SDL_GL_CONTEXT_EGL setting should be removed, and the decision on which context type to create should be done solely based on the SDL_GL_CONTEXT_PROFILE_MASK. The problem of course is that this breaks the contract with the user, though it's something we can work around internally until we eventually deprecate SDL_GL_CONTEXT_EGL.
Created attachment 1290 [details]
egl v3
Fixes weird crash in the Android emulator.
Improves the pause/resume process on Android.
|
Created attachment 1286 [details] egl v1 The attached patch abstracts the EGL functionality from X11 and Android into a common base. I've tried to test as many combinations of common Android pitfalls as I could (rotating, pausing while in landscape, going away via home or task switch button, etc) and it seems to hold up. Once this lands, I'll update the Raspberry patch to be based on this. Ideally, the PSP and Pandora video backends should be updated too.