| Summary: | Image Renders upside down with RenderTarget set and SDL_RenderCopyEx() | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Pallav Nawani <pallavnawani> |
| Component: | render | Assignee: | Sam Lantinga <slouken> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | major | ||
| Priority: | P2 | CC: | gabomdq, gindar |
| Version: | HG 2.1 | Keywords: | target-2.0.0 |
| Hardware: | x86 | ||
| OS: | iOS (All) | ||
| Attachments: | Patch to solve Bug2006 | ||
|
Description
Pallav Nawani
2013-08-02 02:39:16 UTC
I can not reproduce this, I just tried it on my Nexus 4 by forcing the OpenGL ES 1 renderer and it seems to work fine. Can you provide a working example to verify? This bug was observed on iPad2. I assumed that it would exist on android devices too, but I guess not. I will attempt to add more information when I am back in the office. On additional testing, the bug is not present on Android devices. It shows up only on iOS. Created attachment 1317 [details] Patch to solve Bug2006 First we disable useDrawTexture because this is a direct pixel copy and does not respect viewport orientation. Then we add code to flip the viewport mapping (Something like this is already being done in the standard opengl renderer). The issue shows on Sony Xperia Play and Samsung Galaxy Tab 2 as well. I think the proper fix for this would be to copy the code in GLES_RenderCopy which correctly accounts for all cases. See here: http://hg.libsdl.org/SDL/annotate/e978048ced60/src/render/opengles/SDL_render_gles.c#l829 BTW, the mRenderingToTexture variable is redundant, you can check if there's a render target active by verifying SDL_Renderer *renderer renderer->target != NULL True, copying the code from GLES_RenderCopy() would be a better fix. Can you provide a patch based on GLES_RenderCopy() that has been tested on both Android and iOS? Thanks! *** Bug 1851 has been marked as a duplicate of this bug. *** I have same problem on Lenovo A1000 with SDL_RenderCopy (no Ex). I think this may be fixed, can you try in the latest SDL snapshot? http://www.libsdl.org/tmp/SDL-2.0.zip (In reply to Sam Lantinga from comment #11) > I think this may be fixed, can you try in the latest SDL snapshot? > http://www.libsdl.org/tmp/SDL-2.0.zip Yes, works like a charm. Thank you Marking as fixed based on feedback from Josef Vanzura. Feel free to reopen if the problem persists. |