diff options
author | Loren Shih <seraph@lindenlab.com> | 2011-02-01 11:16:43 -0500 |
---|---|---|
committer | Loren Shih <seraph@lindenlab.com> | 2011-02-01 11:16:43 -0500 |
commit | 293b35f000ca4e8a4bcf85dc4782b2a72d1887ea (patch) | |
tree | 70c1731808e5449a56b8a38007c6c952bb559f48 /indra/newview/llvovolume.cpp | |
parent | d0cba9e9194841e8867afcbd02b3792b652756ab (diff) | |
parent | ee39db49a38a626e72e1924e4c157b16d90e8ee6 (diff) |
Automated merge from mesh-development
Diffstat (limited to 'indra/newview/llvovolume.cpp')
-rw-r--r-- | indra/newview/llvovolume.cpp | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index 5277e073a3..b296d21b2b 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -936,6 +936,7 @@ BOOL LLVOVolume::setVolume(const LLVolumeParams ¶ms_in, const S32 detail, bo {
LLVolumeParams volume_params = params_in;
+ S32 last_lod = mVolumep.notNull() ? LLVolumeLODGroup::getVolumeDetailFromScale(mVolumep->getDetail()) : -1;
S32 lod = mLOD;
BOOL is404 = FALSE;
@@ -1014,7 +1015,7 @@ BOOL LLVOVolume::setVolume(const LLVolumeParams ¶ms_in, const S32 detail, bo {
//load request not yet issued, request pipeline load this mesh
LLUUID asset_id = volume_params.getSculptID();
- S32 available_lod = gMeshRepo.loadMesh(this, volume_params, lod);
+ S32 available_lod = gMeshRepo.loadMesh(this, volume_params, lod, last_lod);
if (available_lod != lod)
{
LLPrimitive::setVolume(volume_params, available_lod);
@@ -1075,7 +1076,6 @@ void LLVOVolume::notifyMeshLoaded() {
mSculptChanged = TRUE;
gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_GEOMETRY, TRUE);
- dirtySpatialGroup(TRUE);
}
// sculpt replaces generate() for sculpted surfaces
@@ -1228,7 +1228,7 @@ BOOL LLVOVolume::updateLOD() mLODChanged = TRUE;
}
- lod_changed |= LLViewerObject::updateLOD();
+ lod_changed = lod_changed || LLViewerObject::updateLOD();
return lod_changed;
}
@@ -1608,6 +1608,17 @@ BOOL LLVOVolume::updateGeometry(LLDrawable *drawable) regenFaces();
}
genBBoxes(FALSE);
+
+ if (mSculptChanged)
+ { //changes in sculpt maps can thrash an object bounding box without
+ //triggering a spatial group bounding box update -- force spatial group
+ //to update bounding boxes
+ LLSpatialGroup* group = mDrawable->getSpatialGroup();
+ if (group)
+ {
+ group->unbound();
+ }
+ }
}
}
}
@@ -1632,7 +1643,7 @@ BOOL LLVOVolume::updateGeometry(LLDrawable *drawable) mLODChanged = FALSE;
mSculptChanged = FALSE;
mFaceMappingChanged = FALSE;
-
+
return LLViewerObject::updateGeometry(drawable);
}
|