summaryrefslogtreecommitdiffstats
path: root/src/RendererWorld.cpp
diff options
context:
space:
mode:
authorLaG1924 <12997935+LaG1924@users.noreply.github.com>2017-09-03 17:45:52 +0200
committerLaG1924 <12997935+LaG1924@users.noreply.github.com>2018-01-13 03:39:31 +0100
commit145ba8e157f79db64203db9684af2e6ed33af075 (patch)
treeec524120eaf2dda746d662297483be51fe626367 /src/RendererWorld.cpp
parent2017-08-29 (diff)
downloadAltCraft-145ba8e157f79db64203db9684af2e6ed33af075.tar
AltCraft-145ba8e157f79db64203db9684af2e6ed33af075.tar.gz
AltCraft-145ba8e157f79db64203db9684af2e6ed33af075.tar.bz2
AltCraft-145ba8e157f79db64203db9684af2e6ed33af075.tar.lz
AltCraft-145ba8e157f79db64203db9684af2e6ed33af075.tar.xz
AltCraft-145ba8e157f79db64203db9684af2e6ed33af075.tar.zst
AltCraft-145ba8e157f79db64203db9684af2e6ed33af075.zip
Diffstat (limited to 'src/RendererWorld.cpp')
-rw-r--r--src/RendererWorld.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/RendererWorld.cpp b/src/RendererWorld.cpp
index c90e1fb..a0cb8a7 100644
--- a/src/RendererWorld.cpp
+++ b/src/RendererWorld.cpp
@@ -13,7 +13,7 @@ void RendererWorld::WorkerFunction(size_t workerId) {
sectionsMutex.lock();
auto result = sections.find(vec);
if (result != sections.end()) {
- if (result->second.GetHash() != gs->world.GetSection(result->first).GetHash()) {
+ if (result->second.GetHash() != gs->world.GetSection(result->first)->GetHash()) {
sectionsMutex.unlock();
RendererSectionData data(&gs->world, vec);
renderDataMutex.lock();
@@ -85,8 +85,8 @@ void RendererWorld::UpdateAllSections(VectorF playerPos)
}
RendererWorld::RendererWorld(std::shared_ptr<GameState> ptr):gs(ptr) {
- MaxRenderingDistance = 4;
- numOfWorkers = 4;
+ MaxRenderingDistance = 1;
+ numOfWorkers = 1;
PrepareRender();
@@ -206,6 +206,8 @@ RendererWorld::~RendererWorld() {
delete blockShader;
delete entityShader;
delete skyShader;
+ DebugInfo::renderSections = 0;
+ DebugInfo::readyRenderer = 0;
}
void RendererWorld::Render(RenderState & renderState) {