diff options
author | Xiaohong Bao <bao@lindenlab.com> | 2011-05-05 09:02:23 -0600 |
---|---|---|
committer | Xiaohong Bao <bao@lindenlab.com> | 2011-05-05 09:02:23 -0600 |
commit | a776a11ea6aee0c99f9517c8f217ed07f12fa487 (patch) | |
tree | 2d0d0de12d3d2c9f37d35a52ccc1103657b21be1 /indra/newview/llfloatermodelpreview.cpp | |
parent | a81356f841860c0da1ff991393239f6c9221c9f1 (diff) | |
parent | c9f344d456392025d53b7a74c4012c3ef39d01ce (diff) |
Automated merge with http://hg.secondlife.com/mesh-development
Diffstat (limited to 'indra/newview/llfloatermodelpreview.cpp')
-rw-r--r-- | indra/newview/llfloatermodelpreview.cpp | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp index afe57ebb70..9b6a2c5503 100644 --- a/indra/newview/llfloatermodelpreview.cpp +++ b/indra/newview/llfloatermodelpreview.cpp @@ -3643,21 +3643,19 @@ void LLModelPreview::genLODs(S32 which_lod, U32 decimation, bool enforce_tri_lim glodGroupParameterf(mGroup, GLOD_OBJECT_SPACE_ERROR_THRESHOLD, lod_error_threshold); stop_gloderror(); - glodGroupParameteri(mGroup, GLOD_MAX_TRIANGLES, 0); - stop_gloderror(); - - glodAdaptGroup(mGroup); - stop_gloderror(); - - if (lod_mode == GLOD_TRIANGLE_BUDGET) - { //SH-632 Always adapt to 0 before adapting to actual desired amount, and always - //add 1 to desired amount to avoid decimating below desired amount + if (lod_mode != GLOD_TRIANGLE_BUDGET) + { + glodGroupParameteri(mGroup, GLOD_MAX_TRIANGLES, 0); + } + else + { + //SH-632: always add 1 to desired amount to avoid decimating below desired amount glodGroupParameteri(mGroup, GLOD_MAX_TRIANGLES, triangle_count+1); - stop_gloderror(); - - glodAdaptGroup(mGroup); - stop_gloderror(); } + + stop_gloderror(); + glodAdaptGroup(mGroup); + stop_gloderror(); for (U32 mdl_idx = 0; mdl_idx < mBaseModel.size(); ++mdl_idx) { |