Urgent--texture mapping and gluUnProject

hi group,
How can I get the coordinates of mouse position on a texture to detect and change the texture of that part?
Soner SEN

This is not that trivial.
You can use gluUnProject to get the mouse position in space. You need the inverses of the applied matrices for the reverse mapping from world to model space. If you have found the polygon you clicked on, you’ll have to re-map to texture space including perspective correction.

I haven’t looked at it yet, but on the NVIDIA developer pages there is a demo which shows the footprint of a texture. Probably all the above methods are in there.

thanx for your help.
I tried gluUnProject, however I confused with the z position of the window.
also I tried it on a sphere created by gluSphere and gluQuadricTexture.

Performa a search on gluUnProject on this forum and you’ll find code for it.

Did you ever find a solution? I also need urgent help with this exact same problem.