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/llmeshrepository.cpp | |
| parent | d0cba9e9194841e8867afcbd02b3792b652756ab (diff) | |
| parent | ee39db49a38a626e72e1924e4c157b16d90e8ee6 (diff) | |
Automated merge from mesh-development
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 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); |
