Skip to main content
gamedev.net
🔒 Locked

Picking using glFrustum

Started by Burroughs 0 replies 750+ views
Original Post
Burroughs
Burroughs
Is it possible to use glFrustum with gluPickMatrix. I''ve checked the demo on the NeHe production webpage and used it in one of my project. The picking is working just fine with glOrtho but with glFrustum, it''s not working. Maybe the problem is that I''m using gluLookAt when doing my rendering but when doing the picking. Help would be nice.
Jeff Burroughs
rsegal
rsegal
If I am not mistaken gluLookAt simply makes calls to transformation primitives like glRotate and glTranslate so yes you may want to try calling gluLookAt when doing you''re picking. I ran into similar problems myself a few months back when trying to learn the basics of picking. You need to make sure the transformation matrix that you use for rendering your scene is the exact same one you use for picking. Otherwise you''ll obviously get bizarre results. You may want to display the contents of the model view matrix when rendering you''re scene and when picking then check for differences.
Rob Segal - Software Developerrob@sarcasticcoder.com

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.