Re: 2D Picking with Jogl
Posted by
gouessej on
Sep 25, 2012; 9:13am
URL: https://forum.jogamp.org/2D-Picking-with-Jogl-tp2594712p4026267.html
Please look at the manual of glSelectBuffer:
http://www.manpagez.com/man/3/glSelectBuffer/Use glLoadName, glPushName and glPopName to manipulate the names used to recognize the candidates for the picking. You will find which objects are picked by looking for these names into the hits returned by gl.glRenderMode(GL2.GL_RENDER) after using the select mode. You can use gluProject to convert object coordinates into window coordinates, for example to draw a rectangle over the picked 3D object.