summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/CMakeLists.txt1
-rw-r--r--indra/cmake/CMakeLists.txt1
-rw-r--r--indra/cmake/LLMeshOptimizer.cmake7
-rw-r--r--indra/cmake/MESHOPTIMIZER.cmake16
-rw-r--r--indra/llmeshoptimizer/CMakeLists.txt41
-rw-r--r--indra/llmeshoptimizer/llmeshoptimizer.cpp43
-rw-r--r--indra/llmeshoptimizer/llmeshoptimizer.h37
-rw-r--r--indra/newview/CMakeLists.txt3
8 files changed, 149 insertions, 0 deletions
diff --git a/indra/CMakeLists.txt b/indra/CMakeLists.txt
index 53e5d7b6a5..c504ca3b02 100644
--- a/indra/CMakeLists.txt
+++ b/indra/CMakeLists.txt
@@ -37,6 +37,7 @@ add_subdirectory(${LIBS_OPEN_PREFIX}llkdu)
add_subdirectory(${LIBS_OPEN_PREFIX}llimagej2coj)
add_subdirectory(${LIBS_OPEN_PREFIX}llinventory)
add_subdirectory(${LIBS_OPEN_PREFIX}llmath)
+add_subdirectory(${LIBS_OPEN_PREFIX}llmeshoptimizer)
add_subdirectory(${LIBS_OPEN_PREFIX}llmessage)
add_subdirectory(${LIBS_OPEN_PREFIX}llprimitive)
add_subdirectory(${LIBS_OPEN_PREFIX}llrender)
diff --git a/indra/cmake/CMakeLists.txt b/indra/cmake/CMakeLists.txt
index a17e37cd32..7795aa7db1 100644
--- a/indra/cmake/CMakeLists.txt
+++ b/indra/cmake/CMakeLists.txt
@@ -61,6 +61,7 @@ set(cmake_SOURCE_FILES
LLKDU.cmake
LLLogin.cmake
LLMath.cmake
+ LLMeshOptimizer.cmake
LLMessage.cmake
LLPhysicsExtensions.cmake
LLPlugin.cmake
diff --git a/indra/cmake/LLMeshOptimizer.cmake b/indra/cmake/LLMeshOptimizer.cmake
new file mode 100644
index 0000000000..b79944f618
--- /dev/null
+++ b/indra/cmake/LLMeshOptimizer.cmake
@@ -0,0 +1,7 @@
+# -*- cmake -*-
+
+set(LLMESHOPTIMIZER_INCLUDE_DIRS
+ ${LIBS_OPEN_DIR}/llmeshoptimizer
+ )
+
+set(LLMESHOPTIMIZER_LIBRARIES llmeshoptimizer)
diff --git a/indra/cmake/MESHOPTIMIZER.cmake b/indra/cmake/MESHOPTIMIZER.cmake
new file mode 100644
index 0000000000..7600a56999
--- /dev/null
+++ b/indra/cmake/MESHOPTIMIZER.cmake
@@ -0,0 +1,16 @@
+# -*- cmake -*-
+
+include(Prebuilt)
+
+use_prebuilt_binary(meshoptimizer)
+
+if (WINDOWS)
+ set(MESHOPTIMIZER_LIBRARIES
+ debug meshoptimizer
+ optimized meshoptimizer)
+elseif (LINUX)
+ set(MESHOPTIMIZER_LIBRARIES meshoptimizer)
+elseif (DARWIN)
+ set(MESHOPTIMIZER_LIBRARIES libmeshoptimizer.o)
+endif (WINDOWS)
+set(MESHOPTIMIZER_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include/meshoptimizer)
diff --git a/indra/llmeshoptimizer/CMakeLists.txt b/indra/llmeshoptimizer/CMakeLists.txt
new file mode 100644
index 0000000000..1eea19de66
--- /dev/null
+++ b/indra/llmeshoptimizer/CMakeLists.txt
@@ -0,0 +1,41 @@
+# -*- cmake -*-
+
+project(llmeshoptimizer)
+
+include(MESHOPTIMIZER)
+
+include(00-Common)
+include(LLCommon)
+
+include_directories(
+ ${LLCOMMON_INCLUDE_DIRS}
+ ${LLMESHOPTIMIZER_INCLUDE_DIR}
+ ${MESHOPTIMIZER_INCLUDE_DIRS}
+ ${LIBS_PREBUILT_DIR}/include #access to boost headers, needed for LLError
+ )
+
+set(llmeshoptimizer_SOURCE_FILES
+ llmeshoptimizer.cpp
+ )
+
+set(llmeshoptimizer_HEADER_FILES
+ CMakeLists.txt
+
+ llmeshoptimizer.h
+ )
+
+set_source_files_properties(${llmeshoptimizer_HEADER_FILES}
+ PROPERTIES HEADER_FILE_ONLY TRUE)
+
+list(APPEND llmeshoptimizer_SOURCE_FILES ${llmeshoptimizer_HEADER_FILES})
+
+#if (USE_MESHOPT)
+ add_library (llmeshoptimizer ${llmeshoptimizer_SOURCE_FILES})
+
+ target_link_libraries(llmeshoptimizer
+ ${LLCOMMON_LIBRARIES}
+ ${MESHOPTIMIZER_LIBRARY})
+
+ # Add tests
+
+#endif (USE_MESHOPT)
diff --git a/indra/llmeshoptimizer/llmeshoptimizer.cpp b/indra/llmeshoptimizer/llmeshoptimizer.cpp
new file mode 100644
index 0000000000..770cd5aa3c
--- /dev/null
+++ b/indra/llmeshoptimizer/llmeshoptimizer.cpp
@@ -0,0 +1,43 @@
+ /**
+* @file llmeshoptimizer.cpp
+* @brief Wrapper around meshoptimizer
+*
+* $LicenseInfo:firstyear=2021&license=viewerlgpl$
+* Second Life Viewer Source Code
+* Copyright (C) 2021, Linden Research, Inc.
+*
+* This library is free software; you can redistribute it and/or
+* modify it under the terms of the GNU Lesser General Public
+* License as published by the Free Software Foundation;
+* version 2.1 of the License only.
+*
+* This library is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this library; if not, write to the Free Software
+* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+*
+* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+* $/LicenseInfo$
+*/
+
+#include "llmeshoptimizer.h"
+
+#include "linden_common.h"
+
+#include "meshoptimizer.h"
+#include "llmath.h"
+
+
+LLMeshOptimizer::LLMeshOptimizer()
+{
+
+}
+
+LLMeshOptimizer::~LLMeshOptimizer()
+{
+
+}
diff --git a/indra/llmeshoptimizer/llmeshoptimizer.h b/indra/llmeshoptimizer/llmeshoptimizer.h
new file mode 100644
index 0000000000..edce4edf05
--- /dev/null
+++ b/indra/llmeshoptimizer/llmeshoptimizer.h
@@ -0,0 +1,37 @@
+/**
+* @file llmeshoptimizer.h
+* @brief Wrapper around meshoptimizer
+*
+* $LicenseInfo:firstyear=2021&license=viewerlgpl$
+* Second Life Viewer Source Code
+* Copyright (C) 2021, Linden Research, Inc.
+*
+* This library is free software; you can redistribute it and/or
+* modify it under the terms of the GNU Lesser General Public
+* License as published by the Free Software Foundation;
+* version 2.1 of the License only.
+*
+* This library is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this library; if not, write to the Free Software
+* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+*
+* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+* $/LicenseInfo$
+*/
+#ifndef LLMESHOPTIMIZER_H
+#define LLMESHOPTIMIZER_H
+
+class LLMeshOptimizer
+{
+public:
+ LLMeshOptimizer();
+ ~LLMeshOptimizer();
+private:
+};
+
+#endif //LLMESHOPTIMIZER_H
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index 424fd17707..72d01b264c 100644
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -33,6 +33,7 @@ include(LLInventory)
include(LLKDU)
include(LLLogin)
include(LLMath)
+include(LLMeshOptimizer)
include(LLMessage)
include(LLPhysicsExtensions)
include(LLPlugin)
@@ -79,6 +80,7 @@ include_directories(
${LLKDU_INCLUDE_DIRS}
${LLINVENTORY_INCLUDE_DIRS}
${LLMATH_INCLUDE_DIRS}
+ ${LLMESHOPTIMIZER_INCLUDE_DIRS}
${LLMESSAGE_INCLUDE_DIRS}
${LLPLUGIN_INCLUDE_DIRS}
${LLPRIMITIVE_INCLUDE_DIRS}
@@ -2027,6 +2029,7 @@ target_link_libraries(${VIEWER_BINARY_NAME}
${LLCHARACTER_LIBRARIES}
${LLIMAGE_LIBRARIES}
${LLINVENTORY_LIBRARIES}
+ ${LLMESHOPTIMIZER_LIBRARIES}
${LLMESSAGE_LIBRARIES}
${LLPLUGIN_LIBRARIES}
${LLPRIMITIVE_LIBRARIES}