tags:

views:

159

answers:

2

Is there a function in glut which moves the mouse to a specific position? There is a similar function in SDL (SDL_WarpMouse) but I want to stick to glut.

+2  A: 

I've just found it, you just have to ask the right question and google helps :D

Its glutWarpPointer(middleX, middleY);

Alexander Stolz
+1  A: 

Unless you also hide the pointer this will be very ugly. I used this once for a class project and it did the trick but it looked horrible. but then again I was using it to emulate purely relative mouse movements (basically so it couldn't leave the window). But other than that, yeah, it does the job.

luke