#186 jerky mouse movement after glutWarpPointer

open
nobody
moderate (59)
5
2012-11-04
2012-11-04
Anonymous
No

I migrate from freeglut 2.60 to 2.8 in my project. After the command glutWarpPointer(glutGet(GLUT_WINDOW_WIDTH) / 2, glutGet(GLUT_WINDOW_HEIGHT) / 2) the coordinates of the mouse seem to have spikes in values in mouse movement. This translates into jerky mouse movement. After switching back again to freeglut 2.6 this movement is smooth. For example if I move 50 pixels from the center of the screen to left, the next income of mouse position is at center. In freeglut 2.6 it reports the next position that I registered with the mouse.
Also I traced to a file the incoming mouse positions in freeglut 2.6 after wrappointer to center of the screen, here is an example (x,y), each line is new frame:
831 514
833 538
855 565
884 581
909 587
Example in freeglut 2.8:
960 540
1063 659
960 540
960 540
960 540
1031 576
960 540
The last one reports values to spiky.

Discussion

  • Hmm, I do not observe this behavior on windows 7 as I use this function myself frequently. What OS etc are you running?