Re: depth values in picking

Posted by gouessej on
URL: https://forum.jogamp.org/depth-values-in-picking-tp4030347p4030384.html

Mathieu Blossier wrote
The picking has been tested on hundreds of machine, and it seems to work :)
I worked with an OpenGL expert who collaborated with Previznet on the software PlayViz used by But and showcased on France 2 (French public TV channel) and (with me) at the French institute of petroleum and new energy (IFPEN), I told him to avoid using the OpenGL picking and he stopped using it when he noticed some very important slowdowns by using it with shaders in its own CAD software. If you don't use any shader, it "should" work. Moreover, the OpenGL picking is in the compatibility profile which means that you'll have to find another solution in the future except if you don't plan to support the Core profile but you may not have the choice. Keep in mind that some fixed functions are emulated in recent drivers, especially those not deserving to be "in the metal". I know zero OpenGL-based Java engine using it, there should be a reason. Use it at your own risk, again.

Mathieu Blossier wrote
"screen z value" is the location of a point in z from the screen, in pixels unit. glUnproject may do what I want, but I don't understand how to make it works with gluPickMatrix.
Look at Nehe tutorials, especially the one using glReadPixels and gluUnproject:
http://nehe.gamedev.net/article/using_gluunproject/16013/
http://dmi.uib.es/~josemaria/files/OpenGLFAQ/glu.htm
Julien Gouesse | Personal blog | Website