forked from teamnwah/openmw-tes3coop
Refactor update of lodFlags
This commit is contained in:
parent
2aa09639a9
commit
e4e8821902
1 changed files with 4 additions and 3 deletions
|
@ -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…
Reference in a new issue