Moving the Mouse
Monkey Targets Forums/Desktop/Moving the Mouse| 
 | ||
| Looking at the GLFW we can use glfwSetMousePosCallback(GLFWmouseposfun cbfun) to set the mouse position... but its a call back command, and I think it needs to be set when the window is started. With Mojo code this is within the gxtkApp:Run class. Around line 825 in mojo.glfw.cpp we need this: glfwSetMousePosCallback(MousePosCallback) But Im not sure where to put the rest of the code... Any help? http://gpwiki.org/index.php/OpenGL:Tutorials:Tutorial_Framework:Base | 
| 
 | ||
| Actually, that GLFW function is used to "SET" a callback function to "RECEIVE" mouse move events, not to set the position of the mouse cursor ... :) | 
| 
 | ||
| Ahh I missed read doco... so can you set the mouse cursor position? | 
| 
 | ||
| Not via GLFW, so you'll have to make use of OS specific code. | 
| 
 | ||
| Just found this command: glfwSetMousePos(x, y); Page 28 - 3.4.6: http://www.glfw.org/GLFWReference27.pdf Works for Windows at least... |