diff options
Diffstat (limited to 'indra/newview')
-rwxr-xr-x | indra/newview/lldrawable.cpp | 14 | ||||
-rwxr-xr-x | indra/newview/lldrawable.h | 1 | ||||
-rwxr-xr-x | indra/newview/llpreviewscript.cpp | 2 | ||||
-rwxr-xr-x | indra/newview/llviewerobject.cpp | 5 | ||||
-rwxr-xr-x | indra/newview/llviewerobject.h | 2 | ||||
-rwxr-xr-x | indra/newview/llviewerregion.cpp | 26 | ||||
-rwxr-xr-x | indra/newview/llviewerregion.h | 2 |
7 files changed, 23 insertions, 29 deletions
diff --git a/indra/newview/lldrawable.cpp b/indra/newview/lldrawable.cpp index 5c42868127..7414b24811 100755 --- a/indra/newview/lldrawable.cpp +++ b/indra/newview/lldrawable.cpp @@ -968,20 +968,6 @@ void LLDrawable::shiftPos(const LLVector4a &shift_vector) mVObjp->onShift(shift_vector); } -bool LLDrawable::hasVertexBuffer() const -{ - for (S32 i = 0; i < getNumFaces(); i++) - { - LLFace *facep = getFace(i); - if (facep && facep->getVertexBuffer() != NULL) - { - return true; - } - } - - return false; -} - const LLVector3& LLDrawable::getBounds(LLVector3& min, LLVector3& max) const { mXform.getMinMax(min,max); diff --git a/indra/newview/lldrawable.h b/indra/newview/lldrawable.h index 4648e6272e..a3461d4c01 100755 --- a/indra/newview/lldrawable.h +++ b/indra/newview/lldrawable.h @@ -173,7 +173,6 @@ public: bool isVisible() const; bool isRecentlyVisible() const; - bool hasVertexBuffer() const; virtual void cleanupReferences(); diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp index 61a34d0581..870304a7b8 100755 --- a/indra/newview/llpreviewscript.cpp +++ b/indra/newview/llpreviewscript.cpp @@ -2101,7 +2101,7 @@ LLLiveLSLSaveData::LLLiveLSLSaveData(const LLUUID& id, void LLLiveLSLEditor::saveIfNeeded(bool sync /*= true*/) { LLViewerObject* object = gObjectList.findObject(mObjectUUID); - if(!object || !object->hasVertexBuffer()) + if(!object) { LLNotificationsUtil::add("SaveScriptFailObjectNotFound"); return; diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index df5ce65486..9e2999e521 100755 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -444,11 +444,6 @@ void LLViewerObject::markDead() } } -bool LLViewerObject::hasVertexBuffer() const -{ - return mDrawable.notNull() && mDrawable->hasVertexBuffer(); -} - void LLViewerObject::dump() const { LL_INFOS() << "Type: " << pCodeToString(mPrimitiveCode) << LL_ENDL; diff --git a/indra/newview/llviewerobject.h b/indra/newview/llviewerobject.h index 31b2bd6b99..a2008215d2 100755 --- a/indra/newview/llviewerobject.h +++ b/indra/newview/llviewerobject.h @@ -188,8 +188,6 @@ public: virtual U32 getNumIndices() const; S32 getNumFaces() const { return mNumFaces; } - bool hasVertexBuffer() const; - // Graphical stuff for objects - maybe broken out into render class later? virtual void updateTextures(); virtual void boostTexturePriority(BOOL boost_children = TRUE); // When you just want to boost priority of this object diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp index c3cdfa2901..f9689c7473 100755 --- a/indra/newview/llviewerregion.cpp +++ b/indra/newview/llviewerregion.cpp @@ -847,13 +847,18 @@ void LLViewerRegion::replaceVisibleCacheEntry(LLVOCacheEntry* old_entry, LLVOCac } //physically delete the cache entry -void LLViewerRegion::killCacheEntry(LLVOCacheEntry* entry) +void LLViewerRegion::killCacheEntry(LLVOCacheEntry* entry, bool for_rendering) { if(!entry) { return; } + if(for_rendering && !entry->isState(LLVOCacheEntry::ACTIVE)) + { + addNewObject(entry); //force to add to rendering pipeline + } + //remove from active list and waiting list if(entry->isState(LLVOCacheEntry::ACTIVE)) { @@ -882,9 +887,20 @@ void LLViewerRegion::killCacheEntry(LLVOCacheEntry* entry) parent->removeChild(entry); } } - else if(entry->getNumOfChildren() > 0)//disconnect children if has any + else if(entry->getNumOfChildren() > 0)//remove children from cache if has any { - entry->removeAllChildren(); + S32 num_child = entry->getNumOfChildren(); + + LLVOCacheEntry* child; + for(S32 i = 0; i < num_child; i++) + { + child = entry->getChild(i); + if(child) + { + child->setParentID(0); //disconnect from parent + killCacheEntry(child, for_rendering); + } + } } //remove from mCacheMap, real deletion @@ -1552,13 +1568,13 @@ LLViewerObject* LLViewerRegion::updateCacheEntry(U32 local_id, LLViewerObject* o if(!objectp) //object not created { //create a new object from cache. - objectp = gObjectList.processObjectUpdateFromCache(entry, this); + objectp = addNewObject(entry); } //remove from cache if terse update if(update_type == (U32)OUT_TERSE_IMPROVED) { - killCacheEntry(entry); + killCacheEntry(entry, true); } return objectp; diff --git a/indra/newview/llviewerregion.h b/indra/newview/llviewerregion.h index 6c20282ecd..2085f83f32 100755 --- a/indra/newview/llviewerregion.h +++ b/indra/newview/llviewerregion.h @@ -385,7 +385,7 @@ private: void killObject(LLVOCacheEntry* entry, std::vector<LLDrawable*>& delete_list); void removeFromVOCacheTree(LLVOCacheEntry* entry); void replaceVisibleCacheEntry(LLVOCacheEntry* old_entry, LLVOCacheEntry* new_entry); - void killCacheEntry(LLVOCacheEntry* entry); //physically delete the cache entry + void killCacheEntry(LLVOCacheEntry* entry, bool for_rendering = false); //physically delete the cache entry void killInvisibleObjects(F32 max_time); void createVisibleObjects(F32 max_time); void updateVisibleEntries(F32 max_time); //update visible entries |