The glfw stuff should probably be in the main render loop isntead.
This commit is contained in:
parent
eee5b8e22d
commit
f2a20876f3
2 changed files with 2 additions and 3 deletions
|
|
@ -92,12 +92,14 @@ Scene setup() {
|
|||
}
|
||||
|
||||
void update(GLFWwindow* window, Scene& scene) {
|
||||
glfwPollEvents();
|
||||
process_input(window, scene);
|
||||
scene.updateDelta();
|
||||
}
|
||||
|
||||
void render(GLFWwindow* window, Scene& scene) {
|
||||
scene.render(window);
|
||||
glfwSwapBuffers(window);
|
||||
}
|
||||
|
||||
void quit(GLFWwindow* window, Scene& scene) {
|
||||
|
|
|
|||
|
|
@ -61,9 +61,6 @@ void Scene::render(GLFWwindow* window) {
|
|||
for(auto& position : positions) {
|
||||
draw_model(models[0], projection, view, position);
|
||||
}
|
||||
|
||||
glfwSwapBuffers(window);
|
||||
glfwPollEvents();
|
||||
}
|
||||
|
||||
void Scene::cleanup() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue