View Full Version : Mouse movement
09-29-2004, 05: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.
09-29-2004, 05:46 PM
Any help is welcome (I always forget to add this part in... sry).
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.
09-30-2004, 02: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.
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.