Jump to content
  • Advertisement
Sign in to follow this  
xerzi

OpenGL Mouse input api ?

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

Right now I am using Cpw for my mouse input but it doesn't impress. It seems to use the window event to get the mouse position so my opengl draw is called 60 times a second but the mouse input is being called at off times so even if the mouse is being moved at a constant speed the movement of my camera is jittery shifting from not rotating to than rotating by a greater amount. Is there a better cross platform api out there ?

Share this post


Link to post
Share on other sites
Advertisement
I mean, you could make your own, in Windows, it's pretty simple.

http://msdn.microsoft.com/en-us/library/system.windows.input.mouse.aspx

Just make a class that wraps these functions, create a static singleton/arbiter (or whatever you prefer), and listen for events/pass events in your main event loop.

Most input handling, from what I know, is done using much larger APIs such as Qt, GLUT, etc.

Share this post


Link to post
Share on other sites
I would recommend the use of GLFW. It is available on many platforms, and it will add just and exactly what you want to get platform independent, with a minimal impact on your source code. It's sole purpose is to be used for OpenGL, just like GLUT/freeglut, while being more modern and having less impact.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • 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!