Jump to content
  • Advertisement
Sign in to follow this  
pooispoois

OpenGL OpenGL Perspective Problems

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

I'm using a rotating camera, but when I rotate it, the perspective renders incorrectly. Here is a sample: Before rotating: http://www.imagehosting.com/out.php/i879903_Screen1.jpg After rotating; http://www.imagehosting.com/out.php/i879904_Screen2.jpg The camera manipulations are done just by using gluLookAt. I don't know why it is rendering wrong and I didn't have any success trying to find it out. For reference, the board is a quadrangle (GL_QUAD) and, the pawns are (horribly skinned :P) models loaded from OBJ files using GLM. I don't think this has anything to do with it, though. Thanks in advance for any help!

Share this post


Link to post
Share on other sites
Advertisement
Don't suppose that you're rendering things in an orthographic projection as apposed to perspective are you?

Share this post


Link to post
Share on other sites
From those pictures, it looks to me like the pawns are not actually positioned properly.

Though it's hard to tell with depth testing disabled, it's looks like the pawns are positioned with their origins, rather than their bases, on the board's surface.

Share this post


Link to post
Share on other sites
The view is definitely perspective (although I still don't understand why any view would distort relative positions at all). Depth testing is enabled and the pawns "slide" no matter where I position them on the board.

Share this post


Link to post
Share on other sites
Quote:
Original post by pooispoois
The view is definitely perspective (although I still don't understand why any view would distort relative positions at all). Depth testing is enabled and the pawns "slide" no matter where I position them on the board.


If depth testing is enabled, then why is the black pawn at e5 covering the top of the white pawn at e4 in both pictures?

Mind you, there's only so much we can determine with seeing your source code.

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!