| Summary: | GLES2_RenderReadPixels doesn't use target texture format | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Simon Hug <chli.hug> |
| Component: | render | 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: | Patch that fixes the incorrect format selection in GLES2_RenderReadPixels. | ||
Fixed, thanks! I went ahead and applied the same patch to the OpenGL and OpenGL ES paths. https://hg.libsdl.org/SDL/rev/ef00f5640e86 |
Created attachment 2471 [details] Patch that fixes the incorrect format selection in GLES2_RenderReadPixels. The OpenGL ES 2 renderer does not check the target texture format when using SDL_RenderReadPixels and just always uses ABGR8888. This can result in swapped or wrong colors. The attached patch adds a check and selects the target texture format, if a texture is set as the target.