iDevGames Forums
OpenGL graphical data storage order question. - Printable Version

+- iDevGames Forums (http://www.idevgames.com/forums)
+-- Forum: Development Zone (/forum-3.html)
+--- Forum: Graphics & Audio Programming (/forum-9.html)
+--- Thread: OpenGL graphical data storage order question. (/thread-3307.html)



OpenGL graphical data storage order question. - WhatMeWorry - May 2, 2007 11:03 PM

Why does OpenGL store graphical data in left-to-right, botton-to-top order?

I ok with the left-to-right, but why in the hell are scan lines ordered from bottom to top. Was it just an arbitrary decision or is there some good reason for it.

This is so counter intuitative that it is seriously affecting my health, happiness, and pursuit of pleasure,


OpenGL graphical data storage order question. - OneSadCookie - May 3, 2007 01:45 AM

Why do you say it's counterintuitive? This is the way up things are in mathematics...

In other words: just because you're blinded by prior experience with some other computer graphics API which is upside down, doesn't mean you should slag off OpenGL for doing things right Wink


OpenGL graphical data storage order question. - PowerMacX - May 3, 2007 05:31 AM

WhatMeWorry Wrote:I ok with the left-to-right, but why in the hell are scan lines ordered from bottom to top. Was it just an arbitrary decision or is there some good reason for it.

This is so counter intuitative that it is seriously affecting my health, happiness, and pursuit of pleasure,

Yes, "up" being up is counter-intuitive! Rasp Also, the same holds true for Quartz.


OpenGL graphical data storage order question. - tigakub - May 4, 2007 12:13 PM

I kinda understand where WhatMeWorry is coming from. A mathematician would obviously find the bottom-up orientation of bitmaps to be intuitive, but when a programmer thinks about the framebuffer, the natural orientation is top-down. This is orientation in which the screen is refreshed, and all the primitives are rasterized. So as a programmer, bottom-down would perhaps be more consistent. The fact that many UNIX systems flip the images and the graphical axis upside down is to make it more intuitive for mathematicians.