PDA

View Full Version : Which 3D coordinate system OpenGL uses?



Javac
10-13-2003, 10:04 PM
Does OpenGL uses left-handed or right-handed
coordinate system?
I don't now where the positive x side is.

10-13-2003, 10:20 PM
I believe OpenGL uses a positive X to the left, positive Z into the screen and a positive Y going up. At least this is the original orientation prior to moving your camera.

What I do is use my own coordinate system for all my calculations then modify them to OGL's system for display.

Codifex

10-13-2003, 11:53 PM
OpenGL uses a right-handed coordinate system, with positive x to the right, positive y up and positive z comes out of the screen.

Javac
10-14-2003, 12:44 AM
Thank You.You really helped to me.
I read in OpenGL books that in graphics usaually left-handed system is used,so I
wasted a hole day to understand what is
going on with my inverse coordinates.

vincoof
10-14-2003, 01:55 AM
In fact, the OpenGL design leaves the choice to the user. It's written into the specification.

With that said, imagine you have written your program in right-handed coordinate space, you can switch to left-handed very easily with a scale. Take a look at the FAQ (http://www.opengl.org/developers/faqs/technical/transformations.htm#tran0150) .