Advertisement

Mouse Input with OpenGL

Started by March 14, 2000 08:45 AM
1 comment, last by J0SH 24 years, 11 months ago
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?
I would use DirectInput.
Check this out: Matthew Studios
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.

This topic is closed to new replies.

Advertisement