How to get mouse position on OGL Scene
POINT current;
GetCursorPos(& current);
Then current.x/current.y is your position.
Luigi
(www.lp23.com)
[edited by - lp23 on July 29, 2002 2:15:23 AM]
GetCursorPos(& current);
Then current.x/current.y is your position.
Luigi
(www.lp23.com)
[edited by - lp23 on July 29, 2002 2:15:23 AM]
If you want to get the world coords of the current mouse position, use gluUnProject(...). When you pass 0.0f for winz you get the world coordinate on the near plane and if you pass 1.0f you get the one on the far plane.
Hope this helps,
Gero Gerber
Hope this helps,
Gero Gerber
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement