summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/cmake/GLOD.cmake2
-rw-r--r--indra/newview/CMakeLists.txt4
-rw-r--r--indra/newview/llfloatermodelpreview.cpp21
-rw-r--r--indra/newview/llfloatermodelpreview.h1
-rw-r--r--indra/newview/llviewermenufile.cpp9
-rw-r--r--indra/newview/skins/default/xui/en/notifications.xml7
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 5a06106de3..43aea78775 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 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)
diff --git a/indra/newview/llfloatermodelpreview.h b/indra/newview/llfloatermodelpreview.h
index bb8cf1c587..b5dab262a3 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 f5b41d3179..27f66b7a55 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 756bb52e3e..4063626d8c 100644
--- a/indra/newview/skins/default/xui/en/notifications.xml
+++ b/indra/newview/skins/default/xui/en/notifications.xml
@@ -8789,6 +8789,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"