| Summary: | GL renderers don't need to flip rows after reading back pixels from the target texture | ||
|---|---|---|---|
| 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 upside down target textures when using ReadPixels and GL renderers. | ||
Fixed, thanks! https://hg.libsdl.org/SDL/rev/b8ca95a8eea9 |
Created attachment 2472 [details] Patch that fixes upside down target textures when using ReadPixels and GL renderers. All OpenGL renderers always flip the rows of the pixels that come from glReadPixels. This is unnecessary for target textures since these are already top down. Also, the rect->y value can be used directly for target textures for the same reason. I don't see any code that would handle the logical render size for target textures. Or am I missing something? The attached patch makes the renderers only the flip rows if the data comes from the default framebuffer.