summaryrefslogtreecommitdiffstats
path: root/src/RendererWorld.cpp
diff options
context:
space:
mode:
authorLaG1924 <12997935+LaG1924@users.noreply.github.com>2019-01-27 11:10:15 +0100
committerLaG1924 <12997935+LaG1924@users.noreply.github.com>2019-01-27 11:10:15 +0100
commitda3df2fca7a55ae7ca8342816623bd9cb4d5f33b (patch)
treeef25c742afca6962647aa055f02548ce43f4c472 /src/RendererWorld.cpp
parentAdded const-keyword to World (diff)
downloadAltCraft-da3df2fca7a55ae7ca8342816623bd9cb4d5f33b.tar
AltCraft-da3df2fca7a55ae7ca8342816623bd9cb4d5f33b.tar.gz
AltCraft-da3df2fca7a55ae7ca8342816623bd9cb4d5f33b.tar.bz2
AltCraft-da3df2fca7a55ae7ca8342816623bd9cb4d5f33b.tar.lz
AltCraft-da3df2fca7a55ae7ca8342816623bd9cb4d5f33b.tar.xz
AltCraft-da3df2fca7a55ae7ca8342816623bd9cb4d5f33b.tar.zst
AltCraft-da3df2fca7a55ae7ca8342816623bd9cb4d5f33b.zip
Diffstat (limited to '')
-rw-r--r--src/RendererWorld.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/RendererWorld.cpp b/src/RendererWorld.cpp
index 1743a25..e0a28a4 100644
--- a/src/RendererWorld.cpp
+++ b/src/RendererWorld.cpp
@@ -386,6 +386,7 @@ void RendererWorld::Render(RenderState & renderState) {
Frustum frustum(projView);
size_t culledSections = sections.size();
+ unsigned int renderedFaces = 0;
for (auto& section : sections) {
glm::vec3 point{
section.second.GetPosition().x * 16 + 8,
@@ -400,8 +401,10 @@ void RendererWorld::Render(RenderState & renderState) {
continue;
}
section.second.Render(renderState);
+ renderedFaces += section.second.numOfFaces;
}
this->culledSections = culledSections;
+ DebugInfo::renderFaces = renderedFaces;
glCheckError();
}