PDA

View Full Version : Object selection



epvx
03-27-2004, 11:54 PM
Hi. How to implement the following feature.
I've painted many triangles with
glBegin(...)...glEnd().
Then I'd like to click some pixel in the window and define - which triangle I've just clicked.

mikael_aronsson
03-28-2004, 10:28 AM
Hi !

You use something called selection or picking, have a look at the following web sites.

http://www.helsinki.fi/~tksuoran/selection.html

http://www.unknownroad.com/rtfm/graphics/glselection.html

http://www.opengl.org/resources/tutorials/sig99/advanced99/notes/node35.html

http://www.codeproject.com/opengl/openglmousesellection.asp

Mikael