Change gameShouldTerminate

This commit is contained in:
4VRDriver
2020-08-31 13:21:19 +02:00
parent 291acdbe0d
commit 4fc4b402bc
6 changed files with 11 additions and 7 deletions

View File

@@ -14,6 +14,7 @@ Window::Window() {
// Create OpenGL context
glfwMakeContextCurrent(window);
// Initialize GLAD
if (!gladLoadGLLoader((GLADloadproc)glfwGetProcAddress)) {
std::cout << "Failed to initialize GLAD" << std::endl;
exit(-1);
@@ -21,6 +22,7 @@ Window::Window() {
glViewport(0, 0, width, height);
// Tell GLFW which function to call when window is resized
glfwSetFramebufferSizeCallback(window, framebuffer_size_callback);
}
@@ -29,6 +31,7 @@ Window::~Window() {
glfwDestroyWindow(window);
}
// This function is called when the window gets resized
void Window::framebuffer_size_callback(GLFWwindow* window, int width, int height) {
(void)window;
glViewport(0, 0, width, height);