summaryrefslogtreecommitdiff
path: root/indra/newview/llmeshrepository.cpp
diff options
context:
space:
mode:
authorleyla_linden <none@none>2011-02-01 15:42:52 -0800
committerleyla_linden <none@none>2011-02-01 15:42:52 -0800
commit990a6206604b0a5e33902145b496f39927f6d5b9 (patch)
treec0d7561dc56b9003387554a640505af8fcc7cc51 /indra/newview/llmeshrepository.cpp
parent1b366dfe72c5852904468aaf8ff66e8e7be88318 (diff)
parent7c5c82cb116b2dfd163055994803e07a1bfd5a8b (diff)
Merge
Diffstat (limited to 'indra/newview/llmeshrepository.cpp')
-rwxr-xr-xindra/newview/llmeshrepository.cpp16
1 files changed, 14 insertions, 2 deletions
diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp
index b772999ee2..edcf249a21 100755
--- a/indra/newview/llmeshrepository.cpp
+++ b/indra/newview/llmeshrepository.cpp
@@ -2160,7 +2160,7 @@ S32 LLMeshRepository::update()
return size ;
}
-S32 LLMeshRepository::loadMesh(LLVOVolume* vobj, const LLVolumeParams& mesh_params, S32 detail)
+S32 LLMeshRepository::loadMesh(LLVOVolume* vobj, const LLVolumeParams& mesh_params, S32 detail, S32 last_lod)
{
if (detail < 0 || detail > 4)
{
@@ -2201,7 +2201,19 @@ S32 LLMeshRepository::loadMesh(LLVOVolume* vobj, const LLVolumeParams& mesh_para
if (group)
{
- //first see what the next lowest LOD available might be
+ //first, see if last_lod is available (don't transition down to avoid funny popping a la SH-641)
+ if (last_lod >= 0)
+ {
+ LLVolume* lod = group->refLOD(last_lod);
+ if (lod && !lod->isTetrahedron() && lod->getNumVolumeFaces() > 0)
+ {
+ group->derefLOD(lod);
+ return last_lod;
+ }
+ group->derefLOD(lod);
+ }
+
+ //next, see what the next lowest LOD available might be
for (S32 i = detail-1; i >= 0; --i)
{
LLVolume* lod = group->refLOD(i);