Broken frustum culling

This commit is contained in:
Evert Prants 2018-06-07 08:22:54 +03:00
parent 85b7351688
commit 21d7e800c8
Signed by: evert
GPG Key ID: 1688DA83D222D0B5
1 changed files with 7 additions and 7 deletions

View File

@ -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... if(pChunk->shouldRender()) // Early flags check so we don't always have to do the frustum check...
{ {
// TODO: frustum culling // TODO: fix frustum culling
//glm::vec3 pos = pChunk->getAbsolutePosition(); glm::vec3 pos = pChunk->getAbsolutePosition();
//glm::mat4 model = glm::translate(glm::mat4(1.0f), pos); glm::mat4 model = glm::translate(glm::mat4(1.0f), pos);
//camera->updateFrustum(model); camera->updateFrustum(model);
//if(camera->frustumContainsBox(pos, pos + glm::vec3((float)CHUNK_SIZE))) if(camera->frustumContainsBox(glm::vec3(0.0f), glm::vec3((float)CHUNK_SIZE)) != 0)
//{ {
m_chunkRenderQueue.push_back(pChunk); m_chunkRenderQueue.push_back(pChunk);
//} }
} }
} }
} }