First progress, not yet functional

This commit is contained in:
4VRDriver
2020-09-11 11:11:11 +02:00
parent 04e55ad2ba
commit 712c2655cf
9 changed files with 141 additions and 17 deletions

View File

@@ -14,8 +14,6 @@ EventHandler::EventHandler(GLFWwindow *window)
: window(window) {
glfwSetKeyCallback(window, key_callback);
// Currently disabled because callbacks are shitty
glfwSetCursorPosCallback(window, mouse_callback);
}
@@ -31,7 +29,7 @@ void EventHandler::handleEvents() {
void EventHandler::key_callback(GLFWwindow *window, int key, int scancode, int action, int mods) {
// Silence warnings of unused variables.
(void)window; (void)scancode; (void)mods; (void)key; (void)action;
(void)window; (void)scancode; (void)mods;
if(key==GLFW_KEY_ESCAPE && action == GLFW_PRESS)
glfwSetWindowShouldClose(window, true);