Tracking mouse movement
Hi,
So my problem is, I need keep track of the mouse coordinates while a moust button (say the left button) is being pressed.
So I need to keep track of x0,y0,x1,y1
When a user fist clicks the mouse button, x0 and y0 become that position. (This is easy enough)
Now, the user must hold the mouse button down and move the mouse (like a drag and drop/click and drag). While the user is moving the mouse, I need to continually be getting feedback of the current mouse position. IE x1,y1 must be getting continually updated to the current mouse position.
I don't know how to continually be getting the current mouse position while the mouse button is down. I can only seem to get the position of the initial click.
Does anybody know how to accomplish this?
(the mouse function is being called using:
glutMouseFunc( mouseFunc ) from main )
Thanks.
check the glut header theres 3 mouse functions (one of them gets called when the mouse button is held)
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement