From 65161e6b393a6df6fa0a932aeb940fb7ac7ea084 Mon Sep 17 00:00:00 2001 From: ruslantproductengine Date: Mon, 12 Dec 2016 18:24:46 +0200 Subject: MAINT-6125 - Mesh avatar deforms constantly MAINT-6910 - [MAINT-RC] Some mesh turns invisible when camera is moved on the Maint-RC viewer only - caused by fix for MAINT-6125. Commulative fix. Fixed for booth ticket's in indra/newview/llvovolume.cpp Remained fixed, it's a small code improvements which is not related to MAINT-6125, MAINT-6910 --- indra/newview/lldrawable.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'indra/newview/lldrawable.cpp') diff --git a/indra/newview/lldrawable.cpp b/indra/newview/lldrawable.cpp index f956023358..3bb2c45a24 100644 --- a/indra/newview/lldrawable.cpp +++ b/indra/newview/lldrawable.cpp @@ -979,9 +979,7 @@ void LLDrawable::updateSpatialExtents() if (mVObjp) { const LLVector4a* exts = getSpatialExtents(); - LLVector4a extents[2]; - extents[0] = exts[0]; - extents[1] = exts[1]; + LLVector4a extents[2] = { exts[0], exts[1] }; mVObjp->updateSpatialExtents(extents[0], extents[1]); setSpatialExtents(extents[0], extents[1]); -- cgit v1.2.3 From 6770c27321cf674af57c45ffee6faf09db788a6d Mon Sep 17 00:00:00 2001 From: ruslantproductengine Date: Tue, 24 Jan 2017 15:56:25 +0200 Subject: MAINT-6645 - Improvement - Agents that render as jelly dolls should have their attachments render at 0 LoD to prevent loading higher LoD complexity in memory thus deterring crashes. Comments: - Fix based on "RenderAutoMuteByteLimit" setting. - File indra/llxml/llcontrol.h - add all signals to 0 group. It garanty that handlers (in indra/newview/llviewercontrol.cpp) will be called last. --- indra/newview/lldrawable.cpp | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'indra/newview/lldrawable.cpp') diff --git a/indra/newview/lldrawable.cpp b/indra/newview/lldrawable.cpp index 3bb2c45a24..aa67ea2524 100644 --- a/indra/newview/lldrawable.cpp +++ b/indra/newview/lldrawable.cpp @@ -50,6 +50,7 @@ #include "llviewerobjectlist.h" #include "llviewerwindow.h" #include "llvocache.h" +#include "lldrawpoolavatar.h" const F32 MIN_INTERPOLATE_DISTANCE_SQUARED = 0.001f * 0.001f; const F32 MAX_INTERPOLATE_DISTANCE_SQUARED = 10.f * 10.f; @@ -143,6 +144,28 @@ void LLDrawable::init(bool new_entry) initVisible(sCurVisible - 2);//invisible for the current frame and the last frame. } +void LLDrawable::unload() +{ + LLVOVolume *pVVol = getVOVolume(); + pVVol->setNoLOD(); + + for (S32 i = 0; i < getNumFaces(); i++) + { + LLFace* facep = getFace(i); + if (facep->isState(LLFace::RIGGED)) + { + LLDrawPoolAvatar* pool = (LLDrawPoolAvatar*)facep->getPool(); + if (pool) { + pool->removeRiggedFace(facep); + } + facep->setVertexBuffer(NULL); + } + facep->clearState(LLFace::RIGGED); + } + + pVVol->markForUpdate(TRUE); +} + // static void LLDrawable::initClass() { -- cgit v1.2.3 From 334dfe0587ee374b478a41a04bc4ebcd11d3b7af Mon Sep 17 00:00:00 2001 From: ruslantproductengine Date: Mon, 24 Apr 2017 20:19:48 +0300 Subject: MAINT-6275 - Child prim not touchable after being resized and moved relative to root prim by script. FIXED. It's a very important on each cycle on Drawable::update form(), when object remained in move, list update the CurrentScale member, because if do not do that, it remained in this list forever or when the delta time between two frames a become a sufficiently large (due to interpolation) for overcome the MIN_INTERPOLATE_DISTANCE_SQUARED. --- indra/newview/lldrawable.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'indra/newview/lldrawable.cpp') diff --git a/indra/newview/lldrawable.cpp b/indra/newview/lldrawable.cpp index aa67ea2524..0c47e0f0ee 100644 --- a/indra/newview/lldrawable.cpp +++ b/indra/newview/lldrawable.cpp @@ -618,7 +618,7 @@ F32 LLDrawable::updateXform(BOOL undamped) BOOL damped = !undamped; // Position - LLVector3 old_pos(mXform.getPosition()); + const LLVector3 old_pos(mXform.getPosition()); LLVector3 target_pos; if (mXform.isRoot()) { @@ -632,7 +632,7 @@ F32 LLDrawable::updateXform(BOOL undamped) } // Rotation - LLQuaternion old_rot(mXform.getRotation()); + const LLQuaternion old_rot(mXform.getRotation()); LLQuaternion target_rot = mVObjp->getRotation(); //scaling LLVector3 target_scale = mVObjp->getScale(); @@ -667,6 +667,8 @@ F32 LLDrawable::updateXform(BOOL undamped) { // snap to final position (only if no target omega is applied) dist_squared = 0.0f; + mCurrentScale = target_scale; + if (getVOVolume() && !isRoot()) { //child prim snapping to some position, needs a rebuild gPipeline.markRebuild(this, LLDrawable::REBUILD_POSITION, TRUE); @@ -683,11 +685,11 @@ F32 LLDrawable::updateXform(BOOL undamped) //dist_squared += dist_vec_squared(old_scale, target_scale); } - LLVector3 vec = mCurrentScale-target_scale; + const LLVector3 vec = mCurrentScale-target_scale; + mCurrentScale = target_scale; if (vec*vec > MIN_INTERPOLATE_DISTANCE_SQUARED) { //scale change requires immediate rebuild - mCurrentScale = target_scale; gPipeline.markRebuild(this, LLDrawable::REBUILD_POSITION, TRUE); } else if (!isRoot() && -- cgit v1.2.3 From e2aa2e0008ff473346c1644f9dd094abce99218b Mon Sep 17 00:00:00 2001 From: ruslantproductengine Date: Wed, 26 Apr 2017 15:56:43 +0300 Subject: MAINT-6275 - Child prim not touchable after being resized and moved relative to root prim by script. FIXED. UPDATED: Add comments. --- indra/newview/lldrawable.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'indra/newview/lldrawable.cpp') diff --git a/indra/newview/lldrawable.cpp b/indra/newview/lldrawable.cpp index 0c47e0f0ee..6ca8f1ae9c 100644 --- a/indra/newview/lldrawable.cpp +++ b/indra/newview/lldrawable.cpp @@ -667,6 +667,7 @@ F32 LLDrawable::updateXform(BOOL undamped) { // snap to final position (only if no target omega is applied) dist_squared = 0.0f; + //set target scale here, because of dist_squared = 0.0f remove object from move list mCurrentScale = target_scale; if (getVOVolume() && !isRoot()) @@ -686,6 +687,11 @@ F32 LLDrawable::updateXform(BOOL undamped) } const LLVector3 vec = mCurrentScale-target_scale; + + //It's a very important on each cycle on Drawable::update form(), when object remained in move + //, list update the CurrentScale member, because if do not do that, it remained in this list forever + //or when the delta time between two frames a become a sufficiently large (due to interpolation) + //for overcome the MIN_INTERPOLATE_DISTANCE_SQUARED. mCurrentScale = target_scale; if (vec*vec > MIN_INTERPOLATE_DISTANCE_SQUARED) -- cgit v1.2.3