1UNTITLED LOCAL UNTITLED
2
4 glutWarpPointer — Moves the mouse pointer to given window coordinates.
5
7 OpenGLUT - window
8
10 #include <openglut.h>
11
12 void
13 glutWarpPointer(int x, int y);
14
16 x Window X coord for mouse.
17
18 y Window Y coord for mouse.
19
21 glutWarpPointer() moves the mouse pointer to window-relative coordinates
22 given by x and y.
23
25 x and y are relative to current window.
26
27 Not applicable for GLUT_OFFSCREEN windows.
28
29 Warping means moving, just as if the user had manually moved the mouse.
30 This can generate mouse-motion callbacks. If your callback then moves the
31 pointer again, you may end up in an endless loop. There is some discus‐
32 sion about changing this, but at present this is just a caveat for you,
33 the user, to be aware of.
34
35 Epoch