diff options
-rw-r--r-- | indra/newview/app_settings/settings.xml | 2 | ||||
-rw-r--r-- | indra/newview/llfloatermodelpreview.cpp | 19 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/floater_model_preview.xml | 8 |
3 files changed, 21 insertions, 8 deletions
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 72301e7d14..82087fbe5d 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -8053,7 +8053,7 @@ <key>PreviewRenderSize</key> <map> <key>Comment</key> - <string>Resolution of the image rendered for the mesh upload preview</string> + <string>Resolution of the image rendered for the mesh upload preview (must be a power of 2)</string> <key>Persist</key> <integer>1</integer> <key>Type</key> diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp index c86eed2192..2cc42460a5 100644 --- a/indra/newview/llfloatermodelpreview.cpp +++ b/indra/newview/llfloatermodelpreview.cpp @@ -427,8 +427,23 @@ void LLFloaterModelPreview::initModelPreview() { delete mModelPreview; } - auto size = gSavedSettings.getS32("PreviewRenderSize"); - mModelPreview = new LLModelPreview(size, size, this ); + + S32 tex_width = 512; + S32 tex_height = 512; + + S32 max_width = llmin(gSavedSettings.getS32("PreviewRenderSize"), (S32)gPipeline.mScreenWidth); + S32 max_height = llmin(gSavedSettings.getS32("PreviewRenderSize"), (S32)gPipeline.mScreenHeight); + + while ((tex_width << 1) <= max_width) + { + tex_width <<= 1; + } + while ((tex_height << 1) <= max_height) + { + tex_height <<= 1; + } + + mModelPreview = new LLModelPreview(tex_width, tex_height, this); mModelPreview->setPreviewTarget(16.f); mModelPreview->setDetailsCallback(boost::bind(&LLFloaterModelPreview::setDetails, this, _1, _2, _3, _4, _5)); mModelPreview->setModelUpdatedCallback(boost::bind(&LLFloaterModelPreview::toggleCalculateButton, this, _1)); 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 a07fe99aef..274e6e6c7a 100644 --- a/indra/newview/skins/default/xui/en/floater_model_preview.xml +++ b/indra/newview/skins/default/xui/en/floater_model_preview.xml @@ -1490,7 +1490,6 @@ Analysed: name="right_panel" top="0" left="640" - background_visible="true" width="375"> <text follows="left|top" @@ -1510,7 +1509,6 @@ Analysed: name="right_upper_panel" top="8" left="60" - background_visible="true" width="315"> <combo_box top_pad="3" @@ -1586,7 +1584,7 @@ Analysed: layout="topleft" left="2" name="physics_explode_label" - top="85" + bottom_pad="2" width="150"> Preview Spread: </text> @@ -1594,8 +1592,8 @@ Analysed: name="physics_explode" follows="right|bottom" valign="center" - top="15" - left="80" + left="105" + top_delta="-3" min_val="0.0" max_val="3.0" height="20" |