diff options
| author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2022-01-11 21:13:17 +0200 |
|---|---|---|
| committer | Andrey Lihatskiy <alihatskiy@productengine.com> | 2022-01-12 20:01:36 +0200 |
| commit | 38e77cb958cc88dd75e4d06994c0c93953692f83 (patch) | |
| tree | 8067a22e7151b4b24ca84d9a2b8973e225cbd246 /indra/newview/llfloatermodelpreview.cpp | |
| parent | 6946a6a997061896fbb99cc654520ec6d4f7e179 (diff) | |
SL-16614 Viewer's uploader crash with RenderGLCoreProfile
Diffstat (limited to 'indra/newview/llfloatermodelpreview.cpp')
| -rw-r--r-- | indra/newview/llfloatermodelpreview.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp index abc64a7ad9..0fefb0d432 100644 --- a/indra/newview/llfloatermodelpreview.cpp +++ b/indra/newview/llfloatermodelpreview.cpp @@ -40,6 +40,7 @@ #include "llagent.h" #include "llbutton.h" #include "llcombobox.h" +#include "llfloaterreg.h" #include "llfocusmgr.h" #include "llmeshrepository.h" #include "llnotificationsutil.h" @@ -347,6 +348,26 @@ void LLFloaterModelPreview::initModelPreview() mModelPreview->setModelUpdatedCallback(boost::bind(&LLFloaterModelPreview::modelUpdated, this, _1)); } +//static +bool LLFloaterModelPreview::showModelPreview() +{ +#ifdef LL_GLOD + if (LLRender::sGLCoreProfile) + { + // GLOD is incompatible with RenderGLCoreProfile, will crash on init + LLNotificationsUtil::add("MeshUploadProfilerError"); + return false; + } +#endif + + LLFloaterModelPreview* fmp = (LLFloaterModelPreview*)LLFloaterReg::getInstance("upload_model"); + if (fmp && !fmp->isModelLoading()) + { + fmp->loadHighLodModel(); + } + return true; +} + void LLFloaterModelPreview::onUploadOptionChecked(LLUICtrl* ctrl) { if (mModelPreview) |
