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 - OpenGL ES renderer doesn't flip projection matrix for target textures
Summary: OpenGL ES renderer doesn't flip projection matrix for target textures
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: render (show other bugs)
Version: HG 2.0
Hardware: All All
: P2 normal
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
: 3233 (view as bug list)
Depends on:
Blocks:
 
Reported: 2016-05-28 12:11 UTC by Simon Hug
Modified: 2016-10-01 18:42 UTC (History)
2 users (show)

See Also:


Attachments
Test case for testing the projection matrix of target textures. (4.37 KB, text/x-csrc)
2016-05-28 12:11 UTC, Simon Hug
Details
Patch that flips the projection matrix for target textures in the OpenGL ES renderer. (1.23 KB, patch)
2016-05-28 12:12 UTC, Simon Hug
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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. ***