From c9baf4c66157c601cc4d4e325c7843b3bf9a0cad Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Wed, 7 Jun 2017 14:23:49 +0100 Subject: SL-691,SL-694 - viewer can animate objects based on server messaging. First end-to-end demo for animated objects. --- indra/newview/lldrawpoolavatar.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indra/newview/lldrawpoolavatar.cpp') diff --git a/indra/newview/lldrawpoolavatar.cpp b/indra/newview/lldrawpoolavatar.cpp index b221221f16..fa4fd7c533 100644 --- a/indra/newview/lldrawpoolavatar.cpp +++ b/indra/newview/lldrawpoolavatar.cpp @@ -467,7 +467,8 @@ void LLDrawPoolAvatar::renderShadow(S32 pass) } LLVOAvatar *avatarp = (LLVOAvatar *)facep->getDrawable()->getVObj().get(); - if (avatarp->isDead() || avatarp->mIsDummy || avatarp->mDrawable.isNull()) +// AXON fix + if (avatarp->isDead() || /*avatarp->mIsDummy ||*/ avatarp->mDrawable.isNull()) { return; } -- cgit v1.2.3 From c5dc0ee36e8d17fd0cf25f5a1fbdfb8609a64ee0 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Fri, 9 Jun 2017 21:13:54 +0100 Subject: SL-704 - code cleanup --- indra/newview/lldrawpoolavatar.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/lldrawpoolavatar.cpp') diff --git a/indra/newview/lldrawpoolavatar.cpp b/indra/newview/lldrawpoolavatar.cpp index fa4fd7c533..869e37e08c 100644 --- a/indra/newview/lldrawpoolavatar.cpp +++ b/indra/newview/lldrawpoolavatar.cpp @@ -468,7 +468,7 @@ void LLDrawPoolAvatar::renderShadow(S32 pass) LLVOAvatar *avatarp = (LLVOAvatar *)facep->getDrawable()->getVObj().get(); // AXON fix - if (avatarp->isDead() || /*avatarp->mIsDummy ||*/ avatarp->mDrawable.isNull()) + if (avatarp->isDead() || avatarp->mIsDummy || avatarp->mDrawable.isNull()) { return; } -- cgit v1.2.3 From 96bc66a55778d25fa36ca42092f0ce3ca57bb3ce Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Wed, 25 Oct 2017 20:16:39 +0100 Subject: SL-779 - refactoring related to rigged-mesh determination. animated objects must contain some triangles even if not at the root --- indra/newview/lldrawpoolavatar.cpp | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) (limited to 'indra/newview/lldrawpoolavatar.cpp') diff --git a/indra/newview/lldrawpoolavatar.cpp b/indra/newview/lldrawpoolavatar.cpp index 869e37e08c..b39b2cd6e5 100644 --- a/indra/newview/lldrawpoolavatar.cpp +++ b/indra/newview/lldrawpoolavatar.cpp @@ -1681,13 +1681,7 @@ void LLDrawPoolAvatar::renderRigged(LLVOAvatar* avatar, U32 type, bool glow) continue; } - LLUUID mesh_id = volume->getParams().getSculptID(); - if (mesh_id.isNull()) - { - continue; - } - - const LLMeshSkinInfo* skin = gMeshRepo.getSkinInfo(mesh_id, vobj); + const LLMeshSkinInfo* skin = vobj->getSkinInfo(); if (!skin) { continue; @@ -1901,13 +1895,7 @@ void LLDrawPoolAvatar::updateRiggedVertexBuffers(LLVOAvatar* avatar) continue; } - LLUUID mesh_id = volume->getParams().getSculptID(); - if (mesh_id.isNull()) - { - continue; - } - - const LLMeshSkinInfo* skin = gMeshRepo.getSkinInfo(mesh_id, vobj); + const LLMeshSkinInfo* skin = vobj->getSkinInfo(); if (!skin) { continue; -- cgit v1.2.3 From c025939e42d4c26054ff4a6eeded4b7849c74070 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Fri, 27 Oct 2017 15:10:26 +0100 Subject: MAINT-7857 - shadow fix for animated objects. --- indra/newview/lldrawpoolavatar.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/lldrawpoolavatar.cpp') diff --git a/indra/newview/lldrawpoolavatar.cpp b/indra/newview/lldrawpoolavatar.cpp index b39b2cd6e5..30560eeb7b 100644 --- a/indra/newview/lldrawpoolavatar.cpp +++ b/indra/newview/lldrawpoolavatar.cpp @@ -468,7 +468,7 @@ void LLDrawPoolAvatar::renderShadow(S32 pass) LLVOAvatar *avatarp = (LLVOAvatar *)facep->getDrawable()->getVObj().get(); // AXON fix - if (avatarp->isDead() || avatarp->mIsDummy || avatarp->mDrawable.isNull()) + if (avatarp->isDead() || (avatarp->mIsDummy && !avatarp->isControlAvatar()) || avatarp->mDrawable.isNull()) { return; } -- cgit v1.2.3 From 2f1b75f03e8066b54d9dae16ab29095752c4ee8a Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Thu, 16 Nov 2017 19:24:53 +0000 Subject: SL-704 - first pass cleaning up comments. Also added LLControlAvatar::initInstance() as a potential hook for optimizations. --- indra/newview/lldrawpoolavatar.cpp | 1 - 1 file changed, 1 deletion(-) (limited to 'indra/newview/lldrawpoolavatar.cpp') diff --git a/indra/newview/lldrawpoolavatar.cpp b/indra/newview/lldrawpoolavatar.cpp index 30560eeb7b..206d4f4c7a 100644 --- a/indra/newview/lldrawpoolavatar.cpp +++ b/indra/newview/lldrawpoolavatar.cpp @@ -467,7 +467,6 @@ void LLDrawPoolAvatar::renderShadow(S32 pass) } LLVOAvatar *avatarp = (LLVOAvatar *)facep->getDrawable()->getVObj().get(); -// AXON fix if (avatarp->isDead() || (avatarp->mIsDummy && !avatarp->isControlAvatar()) || avatarp->mDrawable.isNull()) { return; -- cgit v1.2.3 From 4b439ff968a934c127cd685b54bcc206e467a948 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Mon, 4 Dec 2017 11:15:47 +0000 Subject: SL-704 - made avatar hierarchy more consistent by adding lluiavatar for viewer-local avs used in upload previews --- indra/newview/lldrawpoolavatar.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/lldrawpoolavatar.cpp') diff --git a/indra/newview/lldrawpoolavatar.cpp b/indra/newview/lldrawpoolavatar.cpp index 0d8e302123..fe830419e0 100644 --- a/indra/newview/lldrawpoolavatar.cpp +++ b/indra/newview/lldrawpoolavatar.cpp @@ -467,7 +467,7 @@ void LLDrawPoolAvatar::renderShadow(S32 pass) } LLVOAvatar *avatarp = (LLVOAvatar *)facep->getDrawable()->getVObj().get(); - if (avatarp->isDead() || (avatarp->mIsDummy && !avatarp->isControlAvatar()) || avatarp->mDrawable.isNull()) + if (avatarp->isDead() || avatarp->isUIAvatar() || avatarp->mDrawable.isNull()) { return; } -- cgit v1.2.3 From 5cbe0578800c8d9b9c497b08370f23ee1f2c109e Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Fri, 8 Dec 2017 15:20:28 +0000 Subject: SL-838 - prevent deletion of LLDrawPoolAvatar while it still has rigged faces --- indra/newview/lldrawpoolavatar.cpp | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'indra/newview/lldrawpoolavatar.cpp') 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() //----------------------------------------------------------------------------- -- cgit v1.2.3 From ef264fd82e48a376db3c31323b3fcffe4d9c32b4 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Fri, 8 Dec 2017 15:42:29 +0000 Subject: SL-838 - more checking of pool state when adding or removing rigged meshes --- indra/newview/lldrawpoolavatar.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'indra/newview/lldrawpoolavatar.cpp') diff --git a/indra/newview/lldrawpoolavatar.cpp b/indra/newview/lldrawpoolavatar.cpp index 2830a9d686..375704adff 100644 --- a/indra/newview/lldrawpoolavatar.cpp +++ b/indra/newview/lldrawpoolavatar.cpp @@ -2068,11 +2068,16 @@ LLColor3 LLDrawPoolAvatar::getDebugColor() const void LLDrawPoolAvatar::addRiggedFace(LLFace* facep, U32 type) { + llassert (facep->isState(LLFace::RIGGED)); + llassert(getType() == LLDrawPool::POOL_AVATAR); + if (facep->getPool() && facep->getPool() != this) + { + LL_ERRS() << "adding rigged face that's already in another pool" << LL_ENDL; + } if (type >= NUM_RIGGED_PASSES) { LL_ERRS() << "Invalid rigged face type." << LL_ENDL; } - if (facep->getRiggedIndex(type) != -1) { LL_ERRS() << "Tried to add a rigged face that's referenced elsewhere." << LL_ENDL; @@ -2085,6 +2090,12 @@ void LLDrawPoolAvatar::addRiggedFace(LLFace* facep, U32 type) void LLDrawPoolAvatar::removeRiggedFace(LLFace* facep) { + llassert (facep->isState(LLFace::RIGGED)); + llassert(getType() == LLDrawPool::POOL_AVATAR); + if (facep->getPool() != this) + { + LL_ERRS() << "Tried to remove a rigged face from the wrong pool" << LL_ENDL; + } facep->setPool(NULL); for (U32 i = 0; i < NUM_RIGGED_PASSES; ++i) -- cgit v1.2.3 From aacb7eb25fd4caceaafb145ed550e14cebeef665 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Mon, 1 Oct 2018 16:11:09 +0100 Subject: SL-9773 - treat animated object attachments the same as other rigged attachments for purposes of visibility in mouselook. --- indra/newview/lldrawpoolavatar.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/lldrawpoolavatar.cpp') diff --git a/indra/newview/lldrawpoolavatar.cpp b/indra/newview/lldrawpoolavatar.cpp index 905428b090..d5e86143f1 100644 --- a/indra/newview/lldrawpoolavatar.cpp +++ b/indra/newview/lldrawpoolavatar.cpp @@ -1709,7 +1709,7 @@ void LLDrawPoolAvatar::updateRiggedFaceVertexBuffer( void LLDrawPoolAvatar::renderRigged(LLVOAvatar* avatar, U32 type, bool glow) { - if (avatar->isSelf() && !gAgent.needsRenderAvatar()) + if (!avatar->shouldRenderRigged()) { return; } -- cgit v1.2.3