Thanks.
Since the image on the screen is a 2D projection from 3D space, this one
pixel corresponds to a whole set of points, all located on the line passing
through that pixel.
You can reconstruct that line using inverting the projction process
(gluUnProject) assuming two (arbitrary) depth values. After rendering a
scene the pixel will also carry a depth value (in the depth buffer), which
you can pass into gluUnProject, too, giving you the 3D world coordinates.
If you want to find out the position of a certain would-be-rendered fragment
in the world it might be more performant to run a ray<->scene collision
test if a proper algorithm and spatial data structure is used (saves the
overhead of rendering the scene). If however the scene is already rendered
and the position shall be retrieved thereafter, then unprojection is the
way to got.
Wolfgang
--
OpenGL tip #42:
How to exactly map texture texels to screen pixels:
<http://preview.tinyurl.com/cgndc8>