From 96c6200f7271cadec83f8d55e30e3b4713c3f939 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Tue, 25 Jan 2011 15:29:45 -0600 Subject: SH-390 Fix for bad occlusion culling of some mesh objects. --- indra/newview/llvovolume.cpp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'indra/newview/llvovolume.cpp') diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index 5277e073a3..e3b5e613d9 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -1075,7 +1075,6 @@ void LLVOVolume::notifyMeshLoaded() { mSculptChanged = TRUE; gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_GEOMETRY, TRUE); - dirtySpatialGroup(TRUE); } // sculpt replaces generate() for sculpted surfaces @@ -1608,6 +1607,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 +1642,7 @@ BOOL LLVOVolume::updateGeometry(LLDrawable *drawable) mLODChanged = FALSE; mSculptChanged = FALSE; mFaceMappingChanged = FALSE; - + return LLViewerObject::updateGeometry(drawable); } -- cgit v1.2.3 From f0be01bda92553a3e9e671c26c2905b47cacb0b5 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Wed, 26 Jan 2011 15:26:56 -0600 Subject: SH-641 Fix for some objects not properly switching LoD under some situations. Fix for redundant calls to stateSort(LLDrawable*...) Put back "Build Queue" info display. --- indra/newview/llvovolume.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llvovolume.cpp') diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index e3b5e613d9..3dc82f5368 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -1227,7 +1227,7 @@ BOOL LLVOVolume::updateLOD() mLODChanged = TRUE; } - lod_changed |= LLViewerObject::updateLOD(); + lod_changed = lod_changed || LLViewerObject::updateLOD(); return lod_changed; } -- cgit v1.2.3 From 1a51db5b53b3783b002bfa870fa45244df8fafdc Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Tue, 1 Feb 2011 02:33:14 -0600 Subject: SH-641 Cosmetic fix -- keep showing last rendered mesh LoD if requested LoD is unavailable. --- indra/newview/llvovolume.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indra/newview/llvovolume.cpp') diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index 3dc82f5368..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); -- cgit v1.2.3