+ | Starting camera handling

This commit is contained in:
TheRedShip
2024-10-15 14:11:49 +02:00
parent 1c25a29c38
commit a006174ce5
6 changed files with 72 additions and 2 deletions

View File

@ -72,7 +72,10 @@ void Window::mouseMoveCallback(GLFWwindow* window, double xpos, double ypos)
Window* win = static_cast<Window*>(glfwGetWindowUserPointer(window));
(void) win; (void) xpos; (void) ypos;
win->_prevMousePos = win->_mousePos;
win->_mousePos = RT::Vec2i(xpos, ypos);
win->_mouseDelta = win->_mousePos - win->_prevMousePos;
}
void Window::mouseButtonCallback(GLFWwindow* window, int button, int action, int mods)
{