The gluUnProject function maps window coordinates to object coordinates.
int gluUnProject(
GLdouble winx,
GLdouble winy,
GLdouble winz,
const GLdouble modelMatrix[16],
const GLdouble projMatrix[16],
const GLint viewport[4],
GLdouble * objx,
GLdouble * objy,
GLdouble * objz
);
If the function succeeds, the return value is GL_TRUE.
If the function fails, the return value is GL_FALSE.
The gluUnProject function maps the specified window coordinates into object coordinates using modelMatrix, projMatrix, and viewport. The result is stored in objx, objy, and objz.
Windows NT: Use version 3.5 and later.
Windows: Use Windows 95 and later.
Windows CE: Unsupported.
Header: Declared in glu.h.
Import Library: Link with glu32.lib.
glGet, glGetDoublev, glGetIntegerv, gluProject