thanks,marcus256 and ares
[This message has been edited by ruixp (edited 11-21-2001).]
thanks,marcus256 and ares
[This message has been edited by ruixp (edited 11-21-2001).]
Check out http://opengl.freehosting.net/glfw
You can use glfwGetMousePos(&x,&y), and then use the x-values for “turning” information and the y-values for motion information.
The better approach is usually the famous “mouse-look” method: mouse x controls turning, mouse y controls “look up/down”, and then use the keyboard for movement (forward/back and left/right (“strafe”)).
In your WindowProc you can also check for the WM_MOUSEMOVE message that gets called when the mouse moves. The LOWORD of lParam is the x and the HIWORD of lParam is the y coord of the mouse.
You can also use
POINT mouse;
GetCursorPos( &mouse );
to get the mouse position.