Jump to content
  • Advertisement

Archived

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

J0SH

OpenGL Mouse Input with OpenGL

This topic is 6728 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

I have been using the function auxGetMouseLoc(&x,&y) where x and y are integers, from the glut libraries to get my mouse input. I save the mouse value and the next time the mouse moves I check if the new mouse location is greater or less than the old mouse location. All I need to do is check if the mouse is moving left or right. Is there a more efficient way to do this?

Share this post


Link to post
Share on other sites
Advertisement
Your approach seems reasonable given that you aren''t doing much with the mouse. You may also try tracking it using glutMouseMove() and a function you provide, but if your current method is working, it''s probably not needed.

If you need more functionality, and you''re working on a Windows platform, then yeah, you probably want to use DirectInput instead. Nothing wrong with mixing the two.

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!