From a33df10e04b26bcc81e1910d2b3bacb0b0e0dcb4 Mon Sep 17 00:00:00 2001 From: Elisey Puzko Date: Sun, 18 Feb 2018 14:18:48 +0300 Subject: Another attempt at increasing readability --- src/RendererWorld.cpp | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'src/RendererWorld.cpp') diff --git a/src/RendererWorld.cpp b/src/RendererWorld.cpp index 8390de7..5065f9d 100644 --- a/src/RendererWorld.cpp +++ b/src/RendererWorld.cpp @@ -60,8 +60,7 @@ void RendererWorld::WorkerFunction(size_t workerId) { } } -void RendererWorld::UpdateAllSections(VectorF playerPos) -{ +void RendererWorld::UpdateAllSections(VectorF playerPos) { Vector playerChunk(std::floor(gs->player->pos.x / 16), 0, std::floor(gs->player->pos.z / 16)); std::vector suitableChunks; @@ -227,7 +226,10 @@ RendererWorld::~RendererWorld() { void RendererWorld::Render(RenderState & renderState) { //Common GLint projectionLoc, viewLoc, modelLoc, pvLoc, windowSizeLoc, colorLoc; - glm::mat4 projection = glm::perspective(45.0f, (float)renderState.WindowWidth / (float)renderState.WindowHeight, 0.1f, 10000000.0f); + glm::mat4 projection = glm::perspective( + 45.0f, (float) renderState.WindowWidth / (float) renderState.WindowHeight, + 0.1f, 10000000.0f + ); glm::mat4 view = gs->GetViewMatrix(); glm::mat4 projView = projection * view; @@ -328,7 +330,11 @@ void RendererWorld::Render(RenderState & renderState) { } } - double lengthToSection = (gs->player->pos - VectorF(section.first.x*16,section.first.y*16,section.first.z*16)).GetLength(); + double lengthToSection = (gs->player->pos - + VectorF(section.first.x*16, + section.first.y*16, + section.first.z*16) + ).GetLength(); if (!isVisible && lengthToSection > 30.0f) { sectionsMutex.lock(); -- cgit v1.2.3 From 228423d91518d0b8bd1c4bf047f3d378567e00f9 Mon Sep 17 00:00:00 2001 From: Elisey Puzko Date: Thu, 22 Feb 2018 22:07:08 +0300 Subject: Bare-bones blocks placement --- src/RendererWorld.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/RendererWorld.cpp') diff --git a/src/RendererWorld.cpp b/src/RendererWorld.cpp index 5065f9d..16f7950 100644 --- a/src/RendererWorld.cpp +++ b/src/RendererWorld.cpp @@ -212,7 +212,7 @@ RendererWorld::~RendererWorld() { faces += it.second.numOfFaces; } sectionsMutex.unlock(); - LOG(INFO) << "Total faces to render: "<