diff options
| author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2022-01-11 21:13:17 +0200 |
|---|---|---|
| committer | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2022-01-11 21:29:04 +0200 |
| commit | 59356963c4a34081a0c0fb0235c267c06fbcb832 (patch) | |
| tree | 3d7cb562fcaef1c9d1aedb6d2e3ea831f5d49919 /indra/newview/llfloatermodelpreview.cpp | |
| parent | 82a3c185cd39646af861fe8355fa9539f7d3441e (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 64b24d54c3..6d23d14374 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) |
