PDA

View Full Version : Mouse movement



SilverNoise
09-29-2004, 04:44 PM
I have been trying to make a simple openGl example that uses the mouse to rotate some objects around. But if I want to keep rotating the objects one way in fullscreen mode the mouse eventualy reaches the end of the screen and the objects can no longer rotate in that direction. What I figure that I need is either some way of resetting the mouse coordinates every time that happenes (or every frame), or some function that tells me whenever the mouse moved and in which direction instead of just giving me the current coordinates.

SilverNoise
09-29-2004, 04:46 PM
Any help is welcome (I always forget to add this part in... sry).

09-29-2004, 05:09 PM
hey silvernoise, you got the right idea. every time the mouse moves, save the difference in positions (current pos - center of screen), then perform a mouse "warp" back to the center of the screen. under win32 you could use Get/SetCursorPos.

note that this is not related to OpenGL.

:)

SilverNoise
09-30-2004, 01:40 PM
Thaks a lot. I actually happened to stumble upon that same function while looking through the help but I thought it was just to set the text cursor position. Stupid me... anyway thanks again.