Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

q2guy

OpenGL OpenGL is Left-Handed or Right-Handed?

This topic is 5741 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Opengl is Left or right handed? if i want to load a personal matrix for projection or modelview with glLoadMatrixf how i write it? How are the opengl coordinates? Y-up or Z-up? is Z positive to the screen or away the screen, and the x and y? thanks

Share this post


Link to post
Share on other sites
Advertisement
(Normally) It's right handed, with -z going into the screen, +y up and +x to the right.

[edited by - microdot on January 31, 2003 2:31:33 PM]

Share this post


Link to post
Share on other sites
hmm... according to GameInstitute (I''m registered at the OGL class)
"Many OpenGL functions assume a left-handed system"

Hope they don''t sue my @ss for quoting them

"No lies of sugar can sweeten the sournes of reality"

}+TITANIUM+{ A.K.A. DXnewbie[onMIRC]

Share this post


Link to post
Share on other sites
quote:
Original post by Seriema
hmm... according to GameInstitute (I'm registered at the OGL class)
"Many OpenGL functions assume a left-handed system"

Hope they don't sue my @ss for quoting them

"No lies of sugar can sweeten the sournes of reality"

}+TITANIUM+{ A.K.A. DXnewbie[onMIRC]



I hate to say it, but the Red Book says they're wrong.




[edited by - microdot on February 1, 2003 1:04:01 AM]

Share this post


Link to post
Share on other sites
I quote from the OpenGL 1.4 specification (Appendix B - Corollaries):
quote:
OpenGL does not force left- or right-handedness in any of its coordinates systems.

The same is true for older OpenGL versions. It depends entirely on how you setup your projection matrix (e.g. if you flip the left and right edges of an orthogonal projection matrix, you will effectively reverse your x axis direction).

Now by default, the x axis is horizontal (left<->right), the y axis is vertical, and the z axis is also horizonatal (front<->back). But you could easily multiply a rotation into the projection matrix, which will change that (you can even end up with an axis that goes diagonally from one corner of your screen to the opposite corner, although that wouldn't be very comfortable to work with). You can just as well mulitply in a scale, translation, or any other matrix into the projection, to end up with even more distorted results..

Michael K.,
Designer and Graphics Programmer of "The Keepers"



We come in peace... surrender or die!

[edited by - technobot on February 1, 2003 9:02:30 AM]

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!