diff options
Diffstat (limited to 'src/Render.cpp')
-rw-r--r-- | src/Render.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/Render.cpp b/src/Render.cpp index aec60aa..c44c346 100644 --- a/src/Render.cpp +++ b/src/Render.cpp @@ -60,10 +60,13 @@ void Render::PrepareToRendering() { void Render::RenderFrame() { glClearColor(0.2f, 0.3f, 0.3f, 1.0f); - glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); + glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); + if (world) { + world->Update(); + } if (renderWorld) - world->Render(renderState); + world->Render(renderState); window->display(); } @@ -209,7 +212,7 @@ void Render::ExecuteRenderLoop() { window->setTitle("Connecting"); }); - LoopExecutionTimeController timer(std::chrono::milliseconds(32)); + LoopExecutionTimeController timer(std::chrono::milliseconds(16)); while (isRunning) { HandleEvents(); if (isMouseCaptured) HandleMouseCapture(); |