diff options
| author | Dave Parks <davep@lindenlab.com> | 2012-04-20 00:58:55 -0500 | 
|---|---|---|
| committer | Dave Parks <davep@lindenlab.com> | 2012-04-20 00:58:55 -0500 | 
| commit | 5ef21ba6c5b0d6c8b5f201c7d2bede983504383c (patch) | |
| tree | d829f19bc766771b1adb61409fbc946c47f64797 | |
| parent | d953cce3868cf53b3f84e1fdd97119c83d3dff7d (diff) | |
MAINT-775 More edge case cleanup -- spinning child prims still break on deselect until the next LoD update
| -rw-r--r-- | indra/newview/lldrawable.cpp | 11 | ||||
| -rw-r--r-- | indra/newview/llviewertexturelist.cpp | 2 | ||||
| -rw-r--r-- | indra/newview/llvovolume.cpp | 19 | ||||
| -rw-r--r-- | indra/newview/pipeline.cpp | 12 | 
4 files changed, 29 insertions, 15 deletions
diff --git a/indra/newview/lldrawable.cpp b/indra/newview/lldrawable.cpp index e06242055c..d2cedc7035 100644 --- a/indra/newview/lldrawable.cpp +++ b/indra/newview/lldrawable.cpp @@ -551,6 +551,8 @@ F32 LLDrawable::updateXform(BOOL undamped)  	LLVector3 vec = mCurrentScale-target_scale; +	 +  	if (vec*vec > MIN_INTERPOLATE_DISTANCE_SQUARED)  	{ //scale change requires immediate rebuild  		mCurrentScale = target_scale; @@ -564,7 +566,12 @@ F32 LLDrawable::updateXform(BOOL undamped)  		if (!isState(LLDrawable::ANIMATED_CHILD))  		{  			setState(LLDrawable::ANIMATED_CHILD); -			gPipeline.markRebuild(this, LLDrawable::REBUILD_POSITION, TRUE); +			gPipeline.markRebuild(this, LLDrawable::REBUILD_ALL, TRUE); +			LLSpatialGroup* group = getSpatialGroup(); +			if (group) +			{ +				gPipeline.markRebuild(group, TRUE); +			}  		}  	}  	else if (!getVOVolume() && !isAvatar()) @@ -577,7 +584,7 @@ F32 LLDrawable::updateXform(BOOL undamped)  	mXform.setRotation(target_rot);  	mXform.setScale(LLVector3(1,1,1)); //no scale in drawable transforms (IT'S A RULE!)  	mXform.updateMatrix(); -		 +  	if (mSpatialBridge)  	{  		gPipeline.markMoved(mSpatialBridge, FALSE); diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp index a9275fbb29..c463b85913 100644 --- a/indra/newview/llviewertexturelist.cpp +++ b/indra/newview/llviewertexturelist.cpp @@ -680,7 +680,7 @@ void LLViewerTextureList::updateImagesDecodePriorities()  			// Flush formatted images using a lazy flush  			//  			const F32 LAZY_FLUSH_TIMEOUT = 30.f; // stop decoding -			const F32 MAX_INACTIVE_TIME  = 5.f; // actually delete +			const F32 MAX_INACTIVE_TIME  = 20.f; // actually delete  			S32 min_refs = 3; // 1 for mImageList, 1 for mUUIDMap, 1 for local reference  			S32 num_refs = imagep->getNumRefs(); diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index 847a3767bc..433fa475ee 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -684,7 +684,7 @@ void LLVOVolume::updateTextures()  	{  		updateTextureVirtualSize(); -		if (mDrawable.notNull() && !isVisible() && !mDrawable->isActive()) +		/*if (mDrawable.notNull() && !isVisible() && !mDrawable->isActive())  		{ //delete vertex buffer to free up some VRAM  			LLSpatialGroup* group  = mDrawable->getSpatialGroup();  			if (group) @@ -695,7 +695,7 @@ void LLVOVolume::updateTextures()  				//it becomes visible  				group->setState(LLSpatialGroup::GEOM_DIRTY | LLSpatialGroup::MESH_DIRTY | LLSpatialGroup::NEW_DRAWINFO);  			} -		} +		}*/  	}  } @@ -3967,16 +3967,13 @@ void LLVolumeGeometryManager::registerFace(LLSpatialGroup* group, LLFace* facep,  	LLDrawable* drawable = facep->getDrawable(); -	if (drawable->isActive()) +	if (drawable->isState(LLDrawable::ANIMATED_CHILD))  	{ -		if (drawable->isState(LLDrawable::ANIMATED_CHILD)) -		{ -			model_mat = &drawable->getWorldMatrix(); -		} -		else -		{ -			model_mat = &drawable->getRenderMatrix(); -		} +		model_mat = &drawable->getWorldMatrix(); +	} +	else if (drawable->isActive()) +	{ +		model_mat = &drawable->getRenderMatrix();  	}  	else  	{ diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 5d4258ee30..4a0ccb3e5d 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -1793,7 +1793,17 @@ void LLPipeline::updateMovedList(LLDrawable::drawable_vector_t& moved_list)  		drawablep->clearState(LLDrawable::EARLY_MOVE | LLDrawable::MOVE_UNDAMPED);  		if (done)  		{ -			drawablep->clearState(LLDrawable::ON_MOVE_LIST | LLDrawable::ANIMATED_CHILD); +			drawablep->clearState(LLDrawable::ON_MOVE_LIST); +			if (drawablep->isState(LLDrawable::ANIMATED_CHILD)) // && drawablep->getVObj()->getAngularVelocity().isExactlyZero()) +			{ //not a target omega object, will likely not receive any future world matrix updates +				// -- this keeps attachments from getting stuck in space and falling off your avatar +				drawablep->clearState(LLDrawable::ANIMATED_CHILD); +				LLSpatialGroup* group = drawablep->getSpatialGroup(); +				if (group) +				{ +					group->dirtyGeom(); +				}				 +			}  			iter = moved_list.erase(curiter);  		}  	}  | 
