selection and picking

I need to let the user pick up objects with the mouse pointer. How can I do that? Is it necessary to use selection/picking? If so, how can I use them? (my objects are rendered as display lists).
Thanx!

Hi,

You dont have to use the OpenGL selection mode, but it’s easier and more practical when it’s done. However, if your objets are in a 2D plae, you can simply define a “box” around your object and check if your mouse click falls insisde that box, using gluUnProject() (to change from window to world coordonates).
If you want OpenGL to find them for you, use the GL_SELECT mode, with gluPickMatrix()…if you would like some code example ('cause it’s not obvious ), let me know…

Marc.
marc.simard@polymtl.ca