diff --git a/src/planet/PlanetFace.cpp b/src/planet/PlanetFace.cpp index 391cff5..f7e70b7 100644 --- a/src/planet/PlanetFace.cpp +++ b/src/planet/PlanetFace.cpp @@ -312,15 +312,15 @@ void ChunkManager::updateRender(Camera* camera) { if(pChunk->shouldRender()) // Early flags check so we don't always have to do the frustum check... { - // TODO: frustum culling - //glm::vec3 pos = pChunk->getAbsolutePosition(); - //glm::mat4 model = glm::translate(glm::mat4(1.0f), pos); + // TODO: fix frustum culling + glm::vec3 pos = pChunk->getAbsolutePosition(); + glm::mat4 model = glm::translate(glm::mat4(1.0f), pos); - //camera->updateFrustum(model); - //if(camera->frustumContainsBox(pos, pos + glm::vec3((float)CHUNK_SIZE))) - //{ + camera->updateFrustum(model); + if(camera->frustumContainsBox(glm::vec3(0.0f), glm::vec3((float)CHUNK_SIZE)) != 0) + { m_chunkRenderQueue.push_back(pChunk); - //} + } } } }