summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerobject.cpp
diff options
context:
space:
mode:
authorXiaohong Bao <bao@lindenlab.com>2012-12-18 23:16:50 -0700
committerXiaohong Bao <bao@lindenlab.com>2012-12-18 23:16:50 -0700
commit4e22f3e3ef15e24d7e9e0ad156e60d4cd1b2d5c9 (patch)
tree0c837e77525f3bed0aa32c56429ce27ee26ee82e /indra/newview/llviewerobject.cpp
parentc66c8d32c7ead6535cf6d80b7001499df83a523d (diff)
fix for SH-3624: Object deletion does not work
Diffstat (limited to 'indra/newview/llviewerobject.cpp')
-rw-r--r--indra/newview/llviewerobject.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp
index dbccb2a4d9..2aa0e15fc3 100644
--- a/indra/newview/llviewerobject.cpp
+++ b/indra/newview/llviewerobject.cpp
@@ -323,6 +323,22 @@ void LLViewerObject::deleteTEImages()
mTEImages = NULL;
}
+//if enabled, add this object to vo cache tree when removed from rendering.
+void LLViewerObject::EnableToCacheTree(bool enabled)
+{
+ if(mDrawable.notNull() && mDrawable->getEntry() && mDrawable->getEntry()->hasVOCacheEntry())
+ {
+ if(enabled)
+ {
+ ((LLVOCacheEntry*)mDrawable->getEntry()->getVOCacheEntry())->addState(LLVOCacheEntry::ADD_TO_CACHE_TREE);
+ }
+ else
+ {
+ ((LLVOCacheEntry*)mDrawable->getEntry()->getVOCacheEntry())->clearState(LLVOCacheEntry::ADD_TO_CACHE_TREE);
+ }
+ }
+}
+
void LLViewerObject::markDead()
{
if (!mDead)