We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 3347

Summary: OpenGL ES renderer doesn't flip projection matrix for target textures
Product: SDL Reporter: Simon Hug <chli.hug>
Component: renderAssignee: Sam Lantinga <slouken>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2 CC: philipp.wiesemann, rtrussell
Version: HG 2.0   
Hardware: All   
OS: All   
Attachments: Test case for testing the projection matrix of target textures.
Patch that flips the projection matrix for target textures in the OpenGL ES renderer.

Description Simon Hug 2016-05-28 12:11:50 UTC
Created attachment 2468 [details]
Test case for testing the projection matrix of target textures.

When updating the viewport in GLES_UpdateViewport, the OpenGL ES renderer doesn't flip the projection matrix for target textures. The lines, rectangles and textures (if drawn with glDrawArrays) are upside down when drawing to target textures.

Attached is a test case. Patch coming up in next comment.
Comment 1 Simon Hug 2016-05-28 12:12:56 UTC
Created attachment 2469 [details]
Patch that flips the projection matrix for target textures in the OpenGL ES renderer.
Comment 2 Philipp Wiesemann 2016-05-28 20:51:58 UTC
This is maybe related to bug 3233.
Comment 3 Simon Hug 2016-05-29 08:08:45 UTC
Ah, I did see that bug, but totally forgot about it when posting this one.

I was able to test it on Linux (Intel driver and MESA) and a Raspberry Pi. Don't have an Android device, sadly. With any luck, OpenGL works the same there.
Comment 4 Sam Lantinga 2016-10-01 18:41:28 UTC
Fixed, thanks!
https://hg.libsdl.org/SDL/rev/16bfa598c1d6
Comment 5 Sam Lantinga 2016-10-01 18:42:09 UTC
*** Bug 3233 has been marked as a duplicate of this bug. ***