Jump to content
  • Advertisement
Sign in to follow this  
n00body

OpenGL Teapot at an odd angle (SOLVED)

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

This may seem like a weird question, but does glutSolidTeapot() rely on OpenGL's matrix stack? The reason I ask is because ever since I started using my own matrices, and bypassing GL's matrix modes, the camera has been facing the top of the teapot, rather than the side. At first, I thought this was some bug with my matrix, and tested the other glut shapes to see. All the others appeared to be at the correct angles. So does glut implicitly do a rotateX(90) on the teapot? [Edited by - n00body on April 4, 2008 8:30:00 AM]

Share this post


Link to post
Share on other sites
Advertisement
Quote:
Original post by n00body
This may seem like a weird question, but does glutSolidTeapot() rely on OpenGL's matrix stack?
Inasmuch as all vertices passed to openGL are processed by the transformation matrices, yes. And because of the way linear algebra works, even if it did do extra transformations, it wouldn't matter; those would be transparent to its workings.

Share this post


Link to post
Share on other sites
I went poking around in the freeglut teapot files, and found my suspicion was indeed correct. They apply rotate, scale, and translation transformations to the teapot using the MODELVIEW matrix mode of OpenGL.

So naturally, when I stopped using GL's matrix stack, those transformations became ineffectual.

Kinda wish this info was more commonplace. I thought I'd done something wrong when it started doing this without warning.

Share this post


Link to post
Share on other sites
It is called "badly documented". I think GLUT doesn't even have a document.
Anyway, we are talking about GLUT, which isn't used in serious programming.

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!