Jump to content
  • Advertisement
Sign in to follow this  

OpenGL Question about picking

This topic is 3760 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 reading tutorials about picking and selecting of objects in openGL and it reads that this is done by naming and GL_SELECT rendering of objects. The list of hits is then stored in a buffer with hit's depth. It is also said that the selected object is the one closes to the viewer. (camera) But here's the question. What happens when 2 or more objects are in the same distance from the camera? Also I have 2 glspheres posistioned 5,5,0 and 10,10,0. Initialized like this
for (int c=0;c<2;c++)
Hit is detected for each object but no data is in buffer. What did I do wrong?

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!