summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2017-12-08 15:20:28 +0000
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2017-12-08 15:20:28 +0000
commit5cbe0578800c8d9b9c497b08370f23ee1f2c109e (patch)
tree7a30837c3d61f9129257cfb314ff25f1b5078273
parent0c800002e2bdc81d66eb7f7f7eb76448574edad8 (diff)
SL-838 - prevent deletion of LLDrawPoolAvatar while it still has rigged faces
-rw-r--r--indra/newview/lldrawpool.cpp2
-rw-r--r--indra/newview/lldrawpoolavatar.cpp26
-rw-r--r--indra/newview/lldrawpoolavatar.h2
3 files changed, 29 insertions, 1 deletions
diff --git a/indra/newview/lldrawpool.cpp b/indra/newview/lldrawpool.cpp
index f74164aea6..1ec8d97f36 100644
--- a/indra/newview/lldrawpool.cpp
+++ b/indra/newview/lldrawpool.cpp
@@ -140,7 +140,7 @@ LLViewerTexture *LLDrawPool::getDebugTexture()
return NULL;
}
-//virtual
+//virtuals
void LLDrawPool::beginRenderPass( S32 pass )
{
}
diff --git a/indra/newview/lldrawpoolavatar.cpp b/indra/newview/lldrawpoolavatar.cpp
index fe830419e0..2830a9d686 100644
--- a/indra/newview/lldrawpoolavatar.cpp
+++ b/indra/newview/lldrawpoolavatar.cpp
@@ -109,6 +109,32 @@ LLDrawPoolAvatar::LLDrawPoolAvatar() :
{
}
+LLDrawPoolAvatar::~LLDrawPoolAvatar()
+{
+ if (!isDead())
+ {
+ LL_WARNS() << "Destroying avatar drawpool that still contains faces" << LL_ENDL;
+ }
+}
+
+// virtual
+BOOL LLDrawPoolAvatar::isDead()
+{
+ if (!LLFacePool::isDead())
+ {
+ return FALSE;
+ }
+
+ for (U32 i = 0; i < NUM_RIGGED_PASSES; ++i)
+ {
+ if (mRiggedFace[i].size() > 0)
+ {
+ return FALSE;
+ }
+ }
+ return TRUE;
+}
+
//-----------------------------------------------------------------------------
// instancePool()
//-----------------------------------------------------------------------------
diff --git a/indra/newview/lldrawpoolavatar.h b/indra/newview/lldrawpoolavatar.h
index b9d2204052..45b6d71110 100644
--- a/indra/newview/lldrawpoolavatar.h
+++ b/indra/newview/lldrawpoolavatar.h
@@ -60,6 +60,8 @@ public:
virtual S32 getVertexShaderLevel() const;
LLDrawPoolAvatar();
+ ~LLDrawPoolAvatar();
+ /*virtual*/ BOOL isDead();
static LLMatrix4& getModelView();