Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SDL_RenderSetClipRect flipped Y orientation #1969

Closed
SDLBugzilla opened this issue Feb 11, 2021 · 0 comments
Closed

SDL_RenderSetClipRect flipped Y orientation #1969

SDLBugzilla opened this issue Feb 11, 2021 · 0 comments

Comments

@SDLBugzilla
Copy link
Collaborator

This bug report was migrated from our old Bugzilla tracker.

These attachments are available in the static archive:

Reported in version: don't know
Reported for operating system, platform: iOS (All), ARM

Comments on the original bug report:

On 2015-09-12 12:16:19 +0000, Stephen French wrote:

Created attachment 2262
repro for the problem

SDL_RenderSetClipRect() works on SDL 2.0.3 but in the current development branch the clipping rectangle is flipped in the Y direction for iOS and Android targets.

Bug 2700 describes a similar problem, but I've reported this when rendering to the device not a texture. It affects iOS and Android and probably other GLES targets.

Attached a repro. The red rectangle should be at the top of the screen, but is instead at the bottom due to the flipped clipping rectangle.

Also attached a patch which fixes the problem for GLES2 renderer, but a glance at the GLES1 renderer, looks like it contains the same code and is presumably similarly broken. I'm not certain my fix is correct but it works in my test case and app.

On 2015-09-12 12:17:12 +0000, Stephen French wrote:

Created attachment 2263
patch that fixes it for me

On 2015-09-16 20:20:47 +0000, Philipp Wiesemann wrote:

Maybe related to bug 2700.

On 2015-09-16 20:37:20 +0000, Davide Coppola wrote:

*** Bug 3123 has been marked as a duplicate of this bug. ***

On 2015-10-27 20:02:39 +0000, Martin Gerhardy wrote:

The same code is also used for the opengl renderer, not only the gles renderers.

On 2015-10-27 20:04:24 +0000, Martin Gerhardy wrote:

https://hg.libsdl.org/SDL/rev/1d13a878b066 <--- this broke it btw.

On 2015-10-27 20:16:33 +0000, Martin Gerhardy wrote:

pushed a fix into my copy of sdl: mgerhardy/caveexpress@13541e1

On 2015-12-29 00:53:39 +0000, Ryan C. Gordon wrote:

I believe this fixes it, which I just pushed for Bug # 2700:

https://hg.libsdl.org/SDL/rev/f9cd179cf50e

...I think it's identical code to your solution, but if you want to sanity check with the latest in Mercurial, I'd appreciate it. If it's still broken, please reopen this bug!

--ryan.

On 2016-01-06 05:52:51 +0000, Stephen French wrote:

I checked the released version of 2.0.4 and it is working fine (in my app anyway). Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant