PDA

View Full Version : glut-only mouselook



rhmazza
08-13-2002, 03:21 AM
I'm looking to implement a glut-only mouselook. Or rather not to have any windows-specific code.

So is there a way to reposition the mouse cursor to the center of the screen in glut? I haven't been able to find anything like that.

marcus256
08-13-2002, 10:45 PM
GLFW (http://hem.passagen.se/opengl/glfw/) does this automatically for you when you glfwDisable( GLFW_MOUSE_CURSOR ). (GLFW is a toolkit similar to GLUT)

coredump
08-14-2002, 03:54 AM
try glutWarpPointer(int x, int y). this will move the cursor to the window coordinates specified.

b

rhmazza
08-14-2002, 05:04 AM
Thanks, those are both the type of things I'm looking for. Sweet. This BB makes me really happy sometimes http://www.opengl.org/discussion_boards/ubb/wink.gif