| Summary: | Android black screen on resume [2.0.4] | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Richard Russell <rtrussell> |
| Component: | render | Assignee: | Sam Lantinga <slouken> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | ||
| Version: | 2.0.4 | ||
| Hardware: | All | ||
| OS: | Android (All) | ||
| Attachments: | Test Case to demonstrate black screen on resume. | ||
More details can be found at this forum thread: https://forums.libsdl.org/viewtopic.php?t=11770 This bug is still present in 2.0.5, but the fix described above (commenting out or deleting the call to GLES_ActivateRenderer) again seems to be a complete cure. Can somebody who understands the code form an opinion on whether this modification has any undesirable side-effects, and if not incorporate it in the next release? Thanks. Fixed, thanks! https://hg.libsdl.org/SDL/rev/602fec42fe09 |
Created attachment 2404 [details] Test Case to demonstrate black screen on resume. Resuming from a suspended state results in a black screen. This only happens when using GLES 1.1 (GLES 2 resumes correctly) and when the render target has been changed using SDL_SetRenderTarget. This problem is new in 2.0.4. The attached test case demonstrates the issue. Sylvain Becker has apparently found a fix as follows: "In the opengles leaf function (in 'src/render/opengles/SDL_render_gles.c'), it appears there is a call to 'GLES_ActivateRenderer' in 'GLES_SetRenderTarget', which is not present in opengles2. When commenting out this 'GLES_ActivateRenderer', it seems to resume fine". This appears to fix the testcase perfectly, but I don't know whether it could have any undesirable side-effects.