diff options
author | LaG1924 <12997935+LaG1924@users.noreply.github.com> | 2017-10-07 18:38:51 +0200 |
---|---|---|
committer | LaG1924 <12997935+LaG1924@users.noreply.github.com> | 2018-01-13 03:39:32 +0100 |
commit | db696bc49c4a9198abe9670548f90a6123d556b9 (patch) | |
tree | 93007add416ec253b258c0846a67bc581f1809c2 /src/Render.cpp | |
parent | 2017-09-30 (diff) | |
download | AltCraft-db696bc49c4a9198abe9670548f90a6123d556b9.tar AltCraft-db696bc49c4a9198abe9670548f90a6123d556b9.tar.gz AltCraft-db696bc49c4a9198abe9670548f90a6123d556b9.tar.bz2 AltCraft-db696bc49c4a9198abe9670548f90a6123d556b9.tar.lz AltCraft-db696bc49c4a9198abe9670548f90a6123d556b9.tar.xz AltCraft-db696bc49c4a9198abe9670548f90a6123d556b9.tar.zst AltCraft-db696bc49c4a9198abe9670548f90a6123d556b9.zip |
Diffstat (limited to 'src/Render.cpp')
-rw-r--r-- | src/Render.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/Render.cpp b/src/Render.cpp index c607a2d..0011e1c 100644 --- a/src/Render.cpp +++ b/src/Render.cpp @@ -302,6 +302,7 @@ void Render::RenderGui() { ImGui::Text("TPS: %.1f (%.2fms)", 1000.0f / gameTime, gameTime); ImGui::Text("Sections loaded: %d", (int)DebugInfo::totalSections); ImGui::Text("SectionsRenderer: %d (%d)", (int)DebugInfo::renderSections, (int)DebugInfo::readyRenderer); + ImGui::Text("Culled sections: %d", (int)DebugInfo::renderSections - world->culledSections); ImGui::Text("Player pos: %.1f %.1f %.1f OnGround=%d", world->GameStatePtr()->player->pos.x, world->GameStatePtr()->player->pos.y, world->GameStatePtr()->player->pos.z,world->GameStatePtr()->player->onGround); ImGui::Text("Player vel: %.1f %.1f %.1f", world->GameStatePtr()->player->vel.x, world->GameStatePtr()->player->vel.y, world->GameStatePtr()->player->vel.z); ImGui::Text("Player health: %.1f/%.1f", world->GameStatePtr()->g_PlayerHealth, 20.0f); @@ -432,8 +433,8 @@ void Render::RenderGui() { static float sense = sensetivity; ImGui::SliderFloat("Sensetivity", &sense, 0.01f, 1.0f); - static float frameTime = 16.0f; - ImGui::SliderFloat("Frame time", &frameTime, 0.0f, 32.0f); + static float targetFps = 60.0f; + ImGui::SliderFloat("Target FPS", &targetFps, 1.0f, 300.0f); static bool wireframe = isWireframe; @@ -449,7 +450,7 @@ void Render::RenderGui() { sensetivity = sense; isWireframe = wireframe; - timer.SetDelayLength(std::chrono::duration<double,std::milli>(frameTime)); + timer.SetDelayLength(std::chrono::duration<double,std::milli>(1.0/targetFps * 1000.0)); } ImGui::Separator(); |