|
|
@ -123,9 +123,6 @@ int main() { |
|
|
|
return 1; |
|
|
|
return 1; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// glViewport(0, 0, win.getWidth(), win.getHeight());
|
|
|
|
|
|
|
|
// glfwSetFramebufferSizeCallback(win.getWindow(), framebuffer_size_callback); // Framebuffer
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
glEnable(GL_DEPTH_TEST); |
|
|
|
glEnable(GL_DEPTH_TEST); |
|
|
|
|
|
|
|
|
|
|
|
// Input
|
|
|
|
// Input
|
|
|
@ -148,7 +145,7 @@ int main() { |
|
|
|
Controller player(&win, glm::vec3(0.0f, 0.0f, 8.0f)); |
|
|
|
Controller player(&win, glm::vec3(0.0f, 0.0f, 8.0f)); |
|
|
|
scene.setCamera(&player); |
|
|
|
scene.setCamera(&player); |
|
|
|
|
|
|
|
|
|
|
|
while (!glfwWindowShouldClose(win.getWindow())) { |
|
|
|
while (!win.shouldClose()) { |
|
|
|
// Handle input
|
|
|
|
// Handle input
|
|
|
|
player.processInput(scene.deltaTime); |
|
|
|
player.processInput(scene.deltaTime); |
|
|
|
processInput(win.getWindow()); |
|
|
|
processInput(win.getWindow()); |
|
|
@ -162,10 +159,9 @@ int main() { |
|
|
|
scene.render(); |
|
|
|
scene.render(); |
|
|
|
|
|
|
|
|
|
|
|
// glfw
|
|
|
|
// glfw
|
|
|
|
glfwSwapBuffers(win.getWindow()); |
|
|
|
win.swapBuffers(); |
|
|
|
glfwPollEvents(); |
|
|
|
glfwPollEvents(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
glfwTerminate(); |
|
|
|
|
|
|
|
return 0; |
|
|
|
return 0; |
|
|
|
} |
|
|
|
} |
|
|
|