Most of computer graphics systems use screen's top-left corner as staring point, but OpenGL uses bottom-to-top direction, why?
-
2The origin is in the middle, not in a corner. – Bálint Nov 20 '16 at 08:01
-
@Bálint thanks for claryfying, I've fixed the question – madneon Nov 27 '16 at 08:29
-
1Related: http://gamedev.stackexchange.com/questions/83570/why-is-the-origin-in-computer-graphics-coordinates-at-the-top-left – Nov 28 '16 at 18:06
3 Answers
Probably because that's how coordinate systems are traditionally set up when doing math. But to be honest, OpenGL can have its origin anywhere you want and its axes can point in any direction you want (well, so long as they are perpendicular to each other). If you want the origin in the top left and the Y-axis to point down, you simply set your model-view matrix to have a negative Y scale and a Y offset the height of the screen.

- 2,632
- 12
- 16
Think back to the graphs you would draw in school.
The (0,0) point is at bottom-left.
Now, OpenGL is an old, old API and it's derived from an even older one. There were no gaming graphics then; 3D graphics required an expensive workstation with an expensive professional accelerator, and were used for graphing, for CAD, for other professional tasks.
Hence OpenGL follows suit and places it's origin at bottom-left.

- 20,144
- 2
- 38
- 66
Perspective division performed on the Clip Coordinates produces Normalized Device Coordinates, ranging from -1 to 1 in all three axes. https://www.opengl.org/archives/resources/faq/technical/transformations.htm

- 144
- 8
-
1+1, It's a good point. But some explanations right in the answer would be great. – HolyBlackCat Nov 28 '16 at 18:34