projectDepth(p, model, proj, view) transforms the specified 3D object coordinates $p$ into 2D window coordinates $q$ and returns the depth.
projectDepth(p, model, proj, view)
3D object coordinates (x,y,z)
4x4 modelview matrix
4x4 projection matrix
viewport (x, y, width, height)
Projected 2D coordinates and depth
projectDepth(p, model, proj, view)
transforms the specified 3D object coordinates $p$ into 2D window coordinates $q$ and returns the depth.