diff options
Diffstat (limited to 'indra')
-rw-r--r-- | indra/cmake/GLOD.cmake | 2 | ||||
-rw-r--r-- | indra/newview/CMakeLists.txt | 4 | ||||
-rw-r--r-- | indra/newview/llfloatermodelpreview.cpp | 21 | ||||
-rw-r--r-- | indra/newview/llfloatermodelpreview.h | 1 | ||||
-rw-r--r-- | indra/newview/llviewermenufile.cpp | 9 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/notifications.xml | 7 |
6 files changed, 37 insertions, 7 deletions
diff --git a/indra/cmake/GLOD.cmake b/indra/cmake/GLOD.cmake index a347eb6fee..6f42b44ab8 100644 --- a/indra/cmake/GLOD.cmake +++ b/indra/cmake/GLOD.cmake @@ -5,5 +5,7 @@ if (NOT USESYSTEMLIBS) use_prebuilt_binary(glod) endif (NOT USESYSTEMLIBS) +set(GLODLIB ON CACHE BOOL "Using GLOD library") + set(GLOD_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include) set(GLOD_LIBRARIES GLOD) diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 13f8749b9f..6e648485fd 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -1751,6 +1751,10 @@ endif (HAVOK OR HAVOK_TPV) # progress view disables/enables icons based on available packages set_source_files_properties(llprogressview.cpp PROPERTIES COMPILE_FLAGS "${LLSTARTUP_COMPILE_FLAGS}") +if (GLODLIB) + set_source_files_properties(llfloatermodelpreview.cpp PROPERTIES COMPILE_FLAGS "-DLL_GLOD") +endif (GLODLIB) + list(APPEND viewer_SOURCE_FILES ${viewer_HEADER_FILES}) set_source_files_properties(${viewer_HEADER_FILES} 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) diff --git a/indra/newview/llfloatermodelpreview.h b/indra/newview/llfloatermodelpreview.h index 8a01b0c307..19b13bc48a 100644 --- a/indra/newview/llfloatermodelpreview.h +++ b/indra/newview/llfloatermodelpreview.h @@ -73,6 +73,7 @@ public: /*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE); void initModelPreview(); + static bool showModelPreview(); BOOL handleMouseDown(S32 x, S32 y, MASK mask); BOOL handleMouseUp(S32 x, S32 y, MASK mask); diff --git a/indra/newview/llviewermenufile.cpp b/indra/newview/llviewermenufile.cpp index 4efc3d1cb3..4da1bcf541 100644 --- a/indra/newview/llviewermenufile.cpp +++ b/indra/newview/llviewermenufile.cpp @@ -549,13 +549,8 @@ class LLFileUploadModel : public view_listener_t { bool handleEvent(const LLSD& userdata) { - LLFloaterModelPreview* fmp = (LLFloaterModelPreview*) LLFloaterReg::getInstance("upload_model"); - if (fmp && !fmp->isModelLoading()) - { - fmp->loadHighLodModel(); - } - - return TRUE; + LLFloaterModelPreview::showModelPreview(); + return TRUE; } }; diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index b1229d90a3..9d520d5f9a 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -8766,6 +8766,13 @@ See SecondLife.log for details type="alert"> Error while requesting mesh upload permissons. </notification> + + <notification + name="MeshUploadProfilerError" + icon="alert.tga" + type="alert"> +Mesh uploader is incompatible with RenderGLCoreProfile, please turn RenderGLCoreProfile off in debug settings and restart the viewer. + </notification> <notification name="RegionCapabilityRequestError" |