The GLU includes routines that create matrices for standard perspective and orthographic viewing (gluPerspective() and gluOrtho2D()). In addition, a viewing routine allows you to place your eye at any point in space and look at any other point (gluLookAt()). These routines are discussed in Chapter 3 . In addition, the GLU includes a routine to help you create a picking matrix (gluPickMatrix()); this routine is discussed in Chapter 12 . For your convenience, the prototypes for these four routines are listed here.
In addition, GLU provides two routines that convert between object coordinates and screen coordinates, gluProject() and gluUnProject(). GLint gluProject(GLdouble objx, GLdouble objy, GLdouble objz, const GLdouble modelMatrix[16],const GLdouble projMatrix[16], const GLint viewport[4], GLdouble *winx, GLdouble *winy, GLdouble *winz);
Transforms the specified object coordinates objx, objy, and objz into window coordinates using modelMatrix, projMatrix, and viewport. The result is stored in winx, winy, and winz. A return value of GL_TRUE indicates success, and GL_FALSE indicates failure.
GLint 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);
Transforms the specified window coordinates winx, winy, and winz into object coordinates using modelMatrix, projMatrix, and viewport. The result is stored in objx, objy, and objz. A return value of GL_TRUE indicates success, and GL_FALSE indicates failure.
OpenGL Programming Guide