Refactor update of lodFlags

0.6.1
scrawl 8 years ago
parent 2aa09639a9
commit e4e8821902

@ -318,15 +318,16 @@ void loadRenderingNode(ViewData::Entry& entry, ViewData* vd, ChunkManager* chunk
int ourLod = Log2(int(entry.mNode->getSize())); int ourLod = Log2(int(entry.mNode->getSize()));
unsigned int lodFlags = getLodFlags(entry.mNode, ourLod, vd); unsigned int lodFlags = getLodFlags(entry.mNode, ourLod, vd);
if (lodFlags != entry.mLodFlags) if (lodFlags != entry.mLodFlags)
{
entry.mRenderingNode = NULL; entry.mRenderingNode = NULL;
entry.mLodFlags = lodFlags;
}
} }
if (!entry.mRenderingNode) if (!entry.mRenderingNode)
{ {
int ourLod = Log2(int(entry.mNode->getSize())); int ourLod = Log2(int(entry.mNode->getSize()));
unsigned int lodFlags = getLodFlags(entry.mNode, ourLod, vd); entry.mRenderingNode = chunkManager->getChunk(entry.mNode->getSize(), entry.mNode->getCenter(), ourLod, entry.mLodFlags);
entry.mRenderingNode = chunkManager->getChunk(entry.mNode->getSize(), entry.mNode->getCenter(), ourLod, lodFlags);
entry.mLodFlags = lodFlags;
} }
} }

Loading…
Cancel
Save