From 8ba3fe8439ae0a70bcc3f84dbddd24688ef37d59 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Sat, 25 May 2013 15:41:58 +0200 Subject: [PATCH] Backed out 072948fa198e for patch with correct attribution --- indra/newview/lldrawable.h | 1 + indra/newview/llviewerobject.cpp | 3 +-- indra/newview/llviewerobjectlist.cpp | 3 +-- indra/newview/pipeline.cpp | 5 +++++ 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/indra/newview/lldrawable.h b/indra/newview/lldrawable.h index 06bc89e7c1..f736a73a61 100644 --- a/indra/newview/lldrawable.h +++ b/indra/newview/lldrawable.h @@ -284,6 +284,7 @@ public: NEARBY_LIGHT = 0x00200000, // In gPipeline.mNearbyLightSet BUILT = 0x00400000, FORCE_INVISIBLE = 0x00800000, // stay invis until CLEAR_INVISIBLE is set (set of orphaned) + CLEAR_INVISIBLE = 0x01000000, // clear FORCE_INVISIBLE next draw frame REBUILD_SHADOW = 0x02000000, HAS_ALPHA = 0x04000000, RIGGED = 0x08000000, diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index ea5ca5d2a4..63c3fd6f7d 100755 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -2182,8 +2182,7 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys, if (mDrawable->isState(LLDrawable::FORCE_INVISIBLE) && !mOrphaned) { // lldebugs << "Clearing force invisible: " << mID << ":" << getPCodeString() << ":" << getPositionAgent() << llendl; - mDrawable->clearState(LLDrawable::FORCE_INVISIBLE); - gPipeline.markRebuild( mDrawable, LLDrawable::REBUILD_ALL, TRUE ); + mDrawable->setState(LLDrawable::CLEAR_INVISIBLE); } } diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp index dee8fd31ca..1e9acd4602 100644 --- a/indra/newview/llviewerobjectlist.cpp +++ b/indra/newview/llviewerobjectlist.cpp @@ -2188,9 +2188,8 @@ void LLViewerObjectList::findOrphans(LLViewerObject* objectp, U32 ip, U32 port) if (childp->mDrawable.notNull()) { // Make the drawable visible again and set the drawable parent - childp->mDrawable->clearState(LLDrawable::FORCE_INVISIBLE); + childp->mDrawable->setState(LLDrawable::CLEAR_INVISIBLE); childp->setDrawableParent(objectp->mDrawable); // LLViewerObjectList::findOrphans() - gPipeline.markRebuild( childp->mDrawable, LLDrawable::REBUILD_ALL, TRUE ); } // Make certain particles, icon and HUD aren't hidden diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 3dc90e4e86..7534ce5142 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -3361,6 +3361,11 @@ void LLPipeline::stateSort(LLDrawable* drawablep, LLCamera& camera) { drawablep->setVisible(camera, NULL, FALSE); } + else if (drawablep->isState(LLDrawable::CLEAR_INVISIBLE)) + { + // clear invisible flag here to avoid single frame glitch + drawablep->clearState(LLDrawable::FORCE_INVISIBLE|LLDrawable::CLEAR_INVISIBLE); + } } if (LLViewerCamera::sCurCameraID == LLViewerCamera::CAMERA_WORLD)