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 2740 - RenderReadPixels / UpdateTexture upside-down
Summary: RenderReadPixels / UpdateTexture upside-down
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: render (show other bugs)
Version: 2.0.3
Hardware: x86_64 Linux
: P2 normal
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords: target-2.0.6
Depends on:
Blocks:
 
Reported: 2014-09-24 17:04 UTC by sanette
Modified: 2017-10-21 17:11 UTC (History)
1 user (show)

See Also:


Attachments
pixels upside-down (1.34 KB, patch)
2014-09-25 06:53 UTC, sanette
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description sanette 2014-09-24 17:04:54 UTC
If I RenderReadPixels
and then immediately use the pixel data in UpdateTexture,
then the image is upside-down
Comment 1 sanette 2014-09-24 17:05:25 UTC
I'm using the opengl renderer
Comment 2 sanette 2014-09-25 06:53:42 UTC
Created attachment 1881 [details]
pixels upside-down
Comment 3 sanette 2014-09-25 06:54:24 UTC
of course, if I remove the specific code to put pixels top-down
in src/render/opengl/SDL_render_gl.c (see patch) then this works...
but this is very strange.
Comment 4 sanette 2014-09-26 14:16:46 UTC
the upside-down behaviour was noticed already in Bug 2705
Comment 5 Ryan C. Gordon 2015-02-19 06:32:16 UTC
Marking a large number of bugs with the "triage-2.0.4" keyword at once. Sorry
if you got a lot of email from this. This is to help me sort through some bugs
in regards to a 2.0.4 release. We may or may not fix this bug for 2.0.4,
though!
Comment 6 Sam Lantinga 2017-08-14 05:01:27 UTC
Ryan, can you make sure we're reading the pixels the right way for 2.0.6?
Comment 7 Sylvain 2017-10-21 12:58:40 UTC
I tried various configuration (with and without RenderTarget, renderer opengl) and I believe this is fixed.

Very likely with: https://hg.libsdl.org/SDL/rev/b8ca95a8eea9
Comment 8 Sam Lantinga 2017-10-21 17:11:17 UTC
Okay, can you please reopen this if you're still seeing the problem?

Thanks!