Jump to content
  • Advertisement
Sign in to follow this  
stephanus

OpenGL Help With Perspective Correct Interpolation

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

Hi game developers, I'm a beginner in opengl and I'm trying to do perspective correct interpolation. I have used glHint(GL_PERSPECTIVE_CORRECTION_HINT,GL_NICEST) however I'm still getting the wrong result. Can anyone help me? Thanks a lot. Here is the screenshot http://www.comp.nus.edu.sg/~stephanu/perspective.jpg regards, tep

Share this post


Link to post
Share on other sites
Advertisement
You don't provide much information about what you're actually doing to get that result, so I'm going to assume you're drawing a quad with that actual shape. That is, the non-parallell vertical edges is not a cause of perspective, but the actual shape of the quad. If so, this is pretty much what will happen if you're not careful, and isn't really the wrong result. Setting the perspective hint isn't going to help, as OpenGL is already doing what you're telling it to do. It's just that what you're telling it to do is not what you want it to do.

Here's some reading on how to get what I think you want. Clicky.

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!