View Full Version : new jogl version - mouse selection

11-03-2010, 04:07 PM

i know there are plenty of tutorials of mouse selection (also called mouse picking) of how to select objects using the mouse.
what i can't find is a jogl version of how to do it , and all of the examples i can find are in C and are quite messy.
also, i've found at least 2 different solutions (color based and z-buffer based) , and i'm not sure what are the advantages&disadvantages of each of them.
can anyone please tell me if there is an updated jogl tutorial for this issue? something that will also work with the new version of jogl (2) ?

11-03-2010, 04:25 PM
You can also use ray-casting.

Check for intersection between a line into the screen at the mouse position and your objects' geometry.

11-03-2010, 04:38 PM
yes, it is also possible.
the question was about how to do it.
i mean, i wish for an updated tutorial, with working code , of how to do it using jogl (preferably the new version of jogl) .
i also wish to understand which of those methods are probably the best , or at least in which cases we would prefer one over another.