Jump to content
  • Advertisement


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


How to get mouse position on OGL Scene

This topic is 5928 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

POINT current;
GetCursorPos(& current);

Then current.x/current.y is your position.


[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

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!