Improved the logic in LLPipeline::updateDrawableGeom a bit.

This commit is contained in:
Shyotl
2013-04-20 01:02:40 -05:00
parent 39c4d9ad50
commit c9f93a82ce

View File

@@ -2403,15 +2403,18 @@ BOOL LLPipeline::updateDrawableGeom(LLDrawable* drawablep, BOOL priority)
BOOL update_complete = drawablep->updateGeometry(priority);
if (update_complete && assertInitialized())
{
drawablep->setState(LLDrawable::BUILT);
//Workaround for 'missing prims' until it's fixed upstream by LL.
//Sometimes clearing CLEAR_INVISIBLE and FORCE_INVISIBLE in LLPipeline::stateSort was too late. Do it here instead, before
//the rebuild state is picked up on and LLVolumeGeometryManager::rebuildGeom is called.
//If the FORCE_INVISIBLE isn't cleared before the rebuildGeom call, the geometry will NOT BE REBUILT!
if(drawablep->isState(LLDrawable::CLEAR_INVISIBLE))
{
// clear invisible flag here to avoid single frame glitch
drawablep->clearState(LLDrawable::FORCE_INVISIBLE|LLDrawable::CLEAR_INVISIBLE);
return false; //Defer to next mBuildQ1 iteration
}
drawablep->setState(LLDrawable::BUILT);
mGeometryChanges++;
}
return update_complete;