Archived

This topic is now archived and is closed to further replies.

Toubou

How to get mouse position on OGL Scene

Recommended Posts

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]

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites