PDA

View Full Version : problem using gluUnproject



abhijit
05-06-2005, 09:31 AM
I am trying to draw text string wherever I click inside the window. To do that, I first obtain the x, y coordinates of the clicked point and use the gluUnProject with current modelview, projection and viewport setting to get the x, y and z. I set z to a fixed value say -1. I then use glRasterPos3f routine to place the label at the above x, y, z positions. However I found that there is a difference in x, y of the clicked point and the point where the label appears. I also tried to draw a point at the x, y, z and it differs from the actual clicked position. Could anyone plz explain what could be going wrong?

Thanks

-Abhijit

knackered
05-06-2005, 10:04 AM
ask in the beginners forum.