I want to be able to generate the point on the near plane and the far plane for a given mouse point. What I want is the line / ray generated by a mouse point as it travels from the near clipping plane to the far clipping pane. Does anybody have an example that does this?
GluUnProject() is what you are looking for.
Z values of 0.0 will give you the near, and 1.0 will give you the far point you are looking for.