Jump to content
  • Advertisement


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


Selection buffer

This topic is 6192 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, I have a little problem with selecting objects from my scene. I found out that the problem in the code is, that in my resize function I have these lines of code: if (w <= h) glOrtho (-nRange, nRange, -nRange*h/w, nRange*h/w, - nRange *2, nRange*2); else glOrtho (-nRange*w/h, nRange*w/h, -nRange, nRange, -nRange*2, nRange*2); with w being the window width, and h the height. Know, when I use theese two lines of code, I get strange results, because somehow the things seem to be switched, when I click on one object, the selection buffer registers a hit for an other object. Wheras when I substitute the four lines with this line: gluPerspective(45.0f, fAspect, 1.0, 425.0); it works, only that the scene isn''t resized correctly. Do you guys know the reason????

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!