Get 3D OpenGL Coordinates for the 2D window Coordinates

Hi All,

I would like to know how to get the 3D coordinates of a 2D coordinates in my window. I tried to use gluUnProject, but I think I don’t have the right ZWindow.

Thanks for answering
JLuc ;o)

I’m working on a similar attempt, and have successfully done so with:
Vx = (Vz * (Sx - Cx))/Zm
(and repeated with the Y axis)
where Vx = Virtual X coordinate, Vz = Virtual Z coordinate, Sx = Screen X coordinate, Cx = center of screen (x) and Zm = Zoom factor. But the Zoom factor is a problem to calculate.