Create OpenGL context
This commit is contained in:
10
EventHandler.cpp
Normal file
10
EventHandler.cpp
Normal file
@@ -0,0 +1,10 @@
|
||||
#include "EventHandler.h"
|
||||
|
||||
void EventHandler::handleEvents(GLFWwindow *window) {
|
||||
glfwPollEvents();
|
||||
gameShouldTerminate = glfwWindowShouldClose(window);
|
||||
|
||||
if(glfwGetKey(window, GLFW_KEY_ESCAPE) == GLFW_PRESS)
|
||||
glfwSetWindowShouldClose(window, true);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user