diff options
author | Tofu Buzzard <no-email> | 2011-02-01 08:41:44 -0800 |
---|---|---|
committer | Tofu Buzzard <no-email> | 2011-02-01 08:41:44 -0800 |
commit | 622c5f11306c88055fc1be0a290041ef7e3394a4 (patch) | |
tree | f76dff733a690adaa173b7c3f66b78bcf4fc5dfd /indra/newview/llmeshrepository.cpp | |
parent | 489a01181da4f599eb4d0520636278be3ceac2bc (diff) | |
parent | ee39db49a38a626e72e1924e4c157b16d90e8ee6 (diff) |
merge
Diffstat (limited to 'indra/newview/llmeshrepository.cpp')
-rwxr-xr-x | indra/newview/llmeshrepository.cpp | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp index 4e25a13af2..b46b368452 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); |