gevans2000

11-19-2002, 05:17 PM

I'm trying to calculate the real world coordinates of a point on a sphere with texture map, from the coordinates of a mouse click.

I have experimented with gluUnproject but I seem to be getting nonsense for output!

I'm not really sure how to use glDepthRange() to get the z coordinates - I've tried using glReadPixel to get this but I always seem to get the same value wherever I click the mouse.

Any help would be greatly appreciated!

[This message has been edited by gevans2000 (edited 11-19-2002).]

I have experimented with gluUnproject but I seem to be getting nonsense for output!

I'm not really sure how to use glDepthRange() to get the z coordinates - I've tried using glReadPixel to get this but I always seem to get the same value wherever I click the mouse.

Any help would be greatly appreciated!

[This message has been edited by gevans2000 (edited 11-19-2002).]