Broken frustum culling
This commit is contained in:
parent
85b7351688
commit
21d7e800c8
|
@ -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);
|
||||||
//}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue