I'm coding a 3d game, and I want to change the yaw for my camera using:
case WM_MOUSEMOVE:
xPos = (LOWORD(lParam)+(1680/2));
yPos = (HIWORD(lParam)+(1050/2));
graphics.Yaw(xPos);
SetCursorPos(1680/2 , 1050/2);
break;
however, in the WndProc
method, it causes an infinite loop and constant yaw rotation.
Is there a better way I can set the mouse to the center of the window after catching input, without once again calling the method?
EDIT: I've set the current windows to be the full resolution of my monitor (1680x1050) and I'm not actually using OpenGl, I'm using default windows with Visual studio using the Directx9 libraries.