Jump to content
  • Advertisement

Archived

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

loco3d

OpenGL Changing up vector used by OpenGL

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

For the life of me I can''t find anywhere in the man pages for OpenGL how to setup OpenGL to use the Z-axis as the up vector instead of the Y-axis. Does anybody know how to do this? Thanks, LoCo3D

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
gluLook( xpos, ypos, zpos, xeye, yeye, zeye, 0.0, 0.0, 1.0)
?

The last 3 params specify the Up Vector for the camera...
Is this what you mean?

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Now why would you wanna do that? Are you trying to write some kind of a mathematical program where it really matters what you call an axis.

Rotate the space around the X-axis by 90 degrees. I am not sure if orientation of axis (+/- directions) will be correct. but it will put the z-axis up (or down depending on direction of rotation)

Share this post


Link to post
Share on other sites
I guess I should explain why I need to do this. I wrote a 3DStudioMAX importer over the weekend, but in 3DStudioMAX, Z is the up vector....So, all the vertex positions and face mappings I have are incorrect if used in a system where Y is up.

Would it just be easier if I converted the vertices myself and leave OpenGL as it is?

Thanks for the ideas,

LoCo3D

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!