View Full Version : How to get the coordinate in OpenGL

02-09-2000, 07:39 AM
Does anyone could help?
I had to get the coordinate where the mouse pointed. I tried the gluUnProject function but didn't work. How can I get it?

02-09-2000, 11:58 PM
The fact is that if you point the mouse in the window, let's say at (xw, yw), by projecting in 3d space, you should get a line of infinite points, which is orthogonal to the viewing plane: I had the same problem and couldn't work out something good with the gluUnProject: I have no clear idea how to set up the matrix for this operation.