Jump to content
  • Advertisement
Sign in to follow this  
Zmurf

OpenGL Axis Confusion !?!?!?!?!?!?

This topic is 4834 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

Could somone give me a quick rundown or diagram of how the axis work in OpenGL? I thought they were like this: .............-y....-z......... ..............|..../.......... ..............|.../........... ..............|../............ ..............|./............. ..-x______|/_______ x... ............./|............... ............/.|............... .........../..|............... ........../...|............... ........./....|............... ........z.....y............... (This never comes out the way i make it in the editor ><) Bah, I'm so confused by this!

Share this post


Link to post
Share on other sites
Advertisement
+x = right
+y = up
+z = towards you

goto www.opengl.org download the faq + also the opengl spec
buy a couple of books to eg the red book

Share this post


Link to post
Share on other sites
In OpenGL you can set axis as you want; you have complete control on the axis!

However the standard notation is the 'right-hand' one: if you look at the monitor you have x going right, y up and z exiting from it

If you dont like y going up simply glScale(1,-1, 1) !

Also remember that GL stores matrices in the transposed math notation (I dont know the right term and there is always a confusion about it).
In this notation the products are to be performed in the reverse order (because the final result must be the same) so you must understand that the first operation you perform is the last you specify
Example

glTranslate()
glRotate()
glDraw()

First rotate then translate

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • 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!