diff options
Diffstat (limited to 'indra/newview')
-rwxr-xr-x | indra/newview/llfloatermodelpreview.cpp | 10 | ||||
-rw-r--r-- | indra/newview/llfloatermodelpreview.h | 2 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/floater_model_preview.xml | 4 |
3 files changed, 13 insertions, 3 deletions
diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp index c2054bf00f..fabf92c3c6 100755 --- a/indra/newview/llfloatermodelpreview.cpp +++ b/indra/newview/llfloatermodelpreview.cpp @@ -2235,6 +2235,11 @@ LLModelPreview::LLModelPreview(S32 width, S32 height, LLFloater* fmp) mBuildBorderMode = GLOD_BORDER_UNLOCK; mBuildOperator = GLOD_OPERATOR_EDGE_COLLAPSE; + for (U32 i = 0; i < LLModel::NUM_LODS; ++i) + { + mRequestedTriangleCount[i] = 0; + } + mViewOption["show_textures"] = false; mFMP = fmp; @@ -2985,6 +2990,8 @@ void LLModelPreview::genLODs(S32 which_lod, U32 decimation, bool enforce_tri_lim U32 actual_verts = 0; U32 submeshes = 0; + mRequestedTriangleCount[lod] = triangle_count; + glodGroupParameteri(mGroup, GLOD_ADAPT_MODE, lod_mode); stop_gloderror(); @@ -3466,7 +3473,7 @@ void LLModelPreview::updateStatusMessages() LLSpinCtrl* limit = mFMP->getChild<LLSpinCtrl>("lod_triangle_limit"); limit->setMaxValue(mMaxTriangleLimit); - limit->setValue(total_tris[mPreviewLOD]); + limit->setValue(mRequestedTriangleCount[mPreviewLOD]); if (lod_mode == 0) { @@ -3474,6 +3481,7 @@ void LLModelPreview::updateStatusMessages() threshold->setVisible(false); limit->setMaxValue(mMaxTriangleLimit); + limit->setIncrement(mMaxTriangleLimit/32); } else { diff --git a/indra/newview/llfloatermodelpreview.h b/indra/newview/llfloatermodelpreview.h index 8a01f7db2c..ffda565fef 100644 --- a/indra/newview/llfloatermodelpreview.h +++ b/indra/newview/llfloatermodelpreview.h @@ -331,6 +331,8 @@ public: U32 mBuildQueueMode; U32 mBuildOperator; U32 mBuildBorderMode; + S32 mRequestedTriangleCount[LLModel::NUM_LODS]; + LLModelLoader* mModelLoader; diff --git a/indra/newview/skins/default/xui/en/floater_model_preview.xml b/indra/newview/skins/default/xui/en/floater_model_preview.xml index 1ebb3b3fb1..ca4e4a3a2a 100644 --- a/indra/newview/skins/default/xui/en/floater_model_preview.xml +++ b/indra/newview/skins/default/xui/en/floater_model_preview.xml @@ -165,8 +165,8 @@ Error Threshold </combo_item> </combo_box> - <spinner follows="top|left" name="lod_triangle_limit" left_pad="5" height="20" width="100" decimal_digits="0" enabled="true"/> - <spinner left_delta="0" bottom_delta="0" follows="top|left" name="lod_error_threshold" min_val="0" max_val="100" height="20" width="100" decimal_digits="3" visible="false" enabled="true"/> + <spinner follows="top|left" name="lod_triangle_limit" increment="10" left_pad="5" height="20" width="100" decimal_digits="0" enabled="true"/> + <spinner left_delta="0" bottom_delta="0" increment="0.01" follows="top|left" name="lod_error_threshold" min_val="0" max_val="100" height="20" width="100" decimal_digits="3" visible="false" enabled="true"/> <text follows="top|left" name="build_operator_text" left="45" top_pad="10" width="100" height="15"> Build Operator: |