What makes OpenGL right handed?

Started by
62 comments, last by szecs 14 years ago
I often hear OpenGL referred to as using a right handed coordinate system, but I'm a little unclear as to the precise reason why this is so. Sure, the gluXXX helper functions operate in a right handed system, but what specifically about OpenGL makes it right handed?
Advertisement
Negative Z points away from the camera origin( into the screen ) and Positive Y points up, Positive X points towards the right.
It's because of the projection matrix. I believe it is because of the 3rd row, 3 column. I'm not sure since I haven't bothered with that matrix in years.
Sig: http://glhlib.sourceforge.net
an open source GLU replacement library. Much more modern than GLU.
float matrix[16], inverse_matrix[16];
glhLoadIdentityf2(matrix);
glhTranslatef2(matrix, 0.0, 0.0, 5.0);
glhRotateAboutXf2(matrix, angleInRadians);
glhScalef2(matrix, 1.0, 1.0, -1.0);
glhQuickInvertMatrixf2(matrix, inverse_matrix);
glUniformMatrix4fv(uniformLocation1, 1, FALSE, matrix);
glUniformMatrix4fv(uniformLocation2, 1, FALSE, inverse_matrix);
Quote:Original post by gtdelarosa2
Negative Z points away from the camera origin( into the screen ) and Positive Y points up, Positive X points towards the right.


Yes, that's a right handed system, but what about OpenGL requires this?
Quote:Original post by GaryNas
Quote:Original post by gtdelarosa2
Negative Z points away from the camera origin( into the screen ) and Positive Y points up, Positive X points towards the right.


Yes, that's a right handed system, but what about OpenGL requires this?


Why do some countries drive on the right and some on the left side of the road ? It's a convention. They had to pick something.
check this link http://www.geometrictools.com/Documentation/LeftHandedToRightHanded.pdf
"A human being is a part of a whole, called by us,universe, a part limited in time and space. He experiences himself, his thoughts and feelings as something separated from the rest... a kind of optical delusion of his consciousness. This delusion is a kind of prison for us, restricting us to our personal desires and to affection for a few persons nearest to us. Our task must be to free ourselves from this prison by widening our circle of compassion to embrace all living creatures and the whole of nature in its beauty."A. Einstein
The pipeline requires the data to be as such for processing..i.e internally it makes the assumption that stuff are in a right handed coordinate system. Not directly related, but APIs have to make certain assumptions, ex. that is why by default vertices in GL have to be specified counter-clockwise...thats just the way it is.
I have a hunch that this will be a multi-paged thread (probably closed too)
Quote:Original post by Yann L
Why do some countries drive on the right and some on the left side of the road ? It's a convention. They had to pick something.


Do you mean they had to pick something for the glu library, or for OpenGL?

Let me give an example. Assume my models, and world are left handed. I use this left handed world in OpenGL and do not convert to a right handed system. Which part of OpenGL will have trouble with this left handed system? I believe the problem would be in clip space, but I'm not sure.
Your models will be mirrored (I hope God, I'm right...)

This topic is closed to new replies.

Advertisement