diff options
author | LaG1924 <12997935+LaG1924@users.noreply.github.com> | 2017-08-16 17:11:07 +0200 |
---|---|---|
committer | LaG1924 <12997935+LaG1924@users.noreply.github.com> | 2017-08-16 17:11:07 +0200 |
commit | dee50239be8fff566b3ca687bc70900b391a8164 (patch) | |
tree | 6ff6ae2e8e2ea5109d031be8c588f4b8f38f68eb /src/Render.cpp | |
parent | 2017-08-12 (diff) | |
download | AltCraft-dee50239be8fff566b3ca687bc70900b391a8164.tar AltCraft-dee50239be8fff566b3ca687bc70900b391a8164.tar.gz AltCraft-dee50239be8fff566b3ca687bc70900b391a8164.tar.bz2 AltCraft-dee50239be8fff566b3ca687bc70900b391a8164.tar.lz AltCraft-dee50239be8fff566b3ca687bc70900b391a8164.tar.xz AltCraft-dee50239be8fff566b3ca687bc70900b391a8164.tar.zst AltCraft-dee50239be8fff566b3ca687bc70900b391a8164.zip |
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(); |