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 1156

Summary: inverted image in OpenGL
Product: SDL Reporter: misiekaleksander
Component: *don't know*Assignee: Ryan C. Gordon <icculus>
Status: RESOLVED INVALID QA Contact: Sam Lantinga <slouken>
Severity: major    
Priority: P2    
Version: 2.0.0   
Hardware: x86   
OS: Windows Vista   

Description misiekaleksander 2011-03-01 08:04:55 UTC
In SDL for example point (0.0) is upper left.
In OpenGL point (0.0) is lower left so when I load texture and use OpenGL coordinates I have to upper down image. 
Here is related topic: http://forums.libsdl.org/viewtopic.php?t=7026

Here is the same problem other people: 
http://www.gamedev.net/topic/576552-sdl-inverted-image/
http://boardreader.com/thread/SDL_Image_OpenGL_Inverted_f4pkX3zsj.html
http://www.gamedev.net/topic/188170-opengl-texture-mapping-question-sdl/
http://bhsphd.spaces.live.com/blog/cns!1844003DFD14BA7D!312.entry 

Here is solution:
http://www.gribblegames.com/articles/game_programming/sdlgl/invert_sdl_surfaces.html
Comment 1 Sam Lantinga 2011-03-01 08:28:09 UTC
Yep, this is not a bug per-se, 2D and 3D APIs just have different coordinate systems.

You can either flip the pixels, or you can flip your texture coordinates, or you can flip your view matrix, and any are fine solutions.