From 786b291d9c6b784c7ce6ceef0e38a4ec76ea14db Mon Sep 17 00:00:00 2001 From: Nicky Date: Wed, 6 Apr 2022 16:32:52 +0200 Subject: Move CMake files to modernized cmake syntax, step 1. Change projects to cmake targetsto get rid of havig to hardcore include directories and link libraries in consumer projects. --- indra/llprimitive/CMakeLists.txt | 42 ++++++++++++---------------------------- 1 file changed, 12 insertions(+), 30 deletions(-) (limited to 'indra/llprimitive') diff --git a/indra/llprimitive/CMakeLists.txt b/indra/llprimitive/CMakeLists.txt index 7b6d04b096..fb81f19206 100644 --- a/indra/llprimitive/CMakeLists.txt +++ b/indra/llprimitive/CMakeLists.txt @@ -4,27 +4,9 @@ project(llprimitive) include(00-Common) include(LLCommon) -include(LLMath) -include(LLMessage) include(LLCoreHttp) -include(LLXML) include(LLPhysicsExtensions) -include(LLCharacter) - -include_directories( - ${LLCOMMON_INCLUDE_DIRS} - ${LLMATH_INCLUDE_DIRS} - ${LLMESSAGE_INCLUDE_DIRS} - ${LLXML_INCLUDE_DIRS} - ${LIBS_PREBUILT_DIR}/include/collada - ${LIBS_PREBUILT_DIR}/include/collada/1.4 - ${LLCHARACTER_INCLUDE_DIRS} - ) -include_directories(SYSTEM - ${LLCOMMON_SYSTEM_INCLUDE_DIRS} - ${LLXML_SYSTEM_INCLUDE_DIRS} - ${LLPHYSICSEXTENSIONS_INCLUDE_DIRS} - ) +include(LLPrimitive) set(llprimitive_SOURCE_FILES lldaeloader.cpp @@ -71,19 +53,19 @@ set_source_files_properties(${llprimitive_HEADER_FILES} list(APPEND llprimitive_SOURCE_FILES ${llprimitive_HEADER_FILES}) add_library (llprimitive ${llprimitive_SOURCE_FILES}) +set_target_include_dirs( llprimitive ${CMAKE_CURRENT_SOURCE_DIR}) target_link_libraries(llprimitive - ${LLCOMMON_LIBRARIES} - ${LLMATH_LIBRARIES} - ${LLMESSAGE_LIBRARIES} - ${LLCOREHTTP_LIBRARIES} - ${LLXML_LIBRARIES} - ${LLPHYSICSEXTENSIONS_LIBRARIES} - ${LLCHARACTER_LIBRARIES} - ${BOOST_FIBER_LIBRARY} - ${BOOST_CONTEXT_LIBRARY} - ) - + llcommon + llmath + llmessage + llcorehttp + llxml + llcharacter + llphysicsextensions + colladadom::colladadom + pcre::pcre + ) #add unit tests if (LL_TESTS) -- cgit v1.2.3 From 241919e7f7986c11586a49bff53cf19c2c0e0ea6 Mon Sep 17 00:00:00 2001 From: Nicky Date: Wed, 13 Apr 2022 19:21:55 +0200 Subject: Rework cmake, the original plan was to maybe be able to use conan targets with the same name (that's why 3ps had names like apr::apr), but it's safer and saner to put the LL 3ps under the ll:: prefix. This also allows means it is possible to get rid of that bad "if( TRAGET ...) return() endif()" pattern and rather use include_guard(). --- indra/llprimitive/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/llprimitive') diff --git a/indra/llprimitive/CMakeLists.txt b/indra/llprimitive/CMakeLists.txt index fb81f19206..79b54c9df8 100644 --- a/indra/llprimitive/CMakeLists.txt +++ b/indra/llprimitive/CMakeLists.txt @@ -63,8 +63,8 @@ target_link_libraries(llprimitive llxml llcharacter llphysicsextensions - colladadom::colladadom - pcre::pcre + ll::colladadom + ll::pcre ) #add unit tests -- cgit v1.2.3 From e0cf0cdfd49e5a946dcd202a083fb23f01e4f1fe Mon Sep 17 00:00:00 2001 From: Nicky Date: Sun, 17 Apr 2022 18:04:57 +0200 Subject: Switch to target_include_directories All 3Ps include dirs are treated as SYSTEM, this will stop compilers stop emitting warnings from those files and greatly helps having high warning levels and not being swamped by warnings that come from external libraries. --- indra/llprimitive/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llprimitive') diff --git a/indra/llprimitive/CMakeLists.txt b/indra/llprimitive/CMakeLists.txt index 79b54c9df8..d69b24a07f 100644 --- a/indra/llprimitive/CMakeLists.txt +++ b/indra/llprimitive/CMakeLists.txt @@ -53,7 +53,7 @@ set_source_files_properties(${llprimitive_HEADER_FILES} list(APPEND llprimitive_SOURCE_FILES ${llprimitive_HEADER_FILES}) add_library (llprimitive ${llprimitive_SOURCE_FILES}) -set_target_include_dirs( llprimitive ${CMAKE_CURRENT_SOURCE_DIR}) +target_include_directories( llprimitive INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) target_link_libraries(llprimitive llcommon -- cgit v1.2.3 From 2b151e0aefd54671e1be504269f10318d303dccb Mon Sep 17 00:00:00 2001 From: Nicky Date: Mon, 18 Apr 2022 18:11:43 +0200 Subject: Round one to support conan for 3P packages, this allows to build the viewer on Linux again. --- indra/llprimitive/CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra/llprimitive') diff --git a/indra/llprimitive/CMakeLists.txt b/indra/llprimitive/CMakeLists.txt index d69b24a07f..698d523dd3 100644 --- a/indra/llprimitive/CMakeLists.txt +++ b/indra/llprimitive/CMakeLists.txt @@ -7,6 +7,7 @@ include(LLCommon) include(LLCoreHttp) include(LLPhysicsExtensions) include(LLPrimitive) +include(GLH) set(llprimitive_SOURCE_FILES lldaeloader.cpp @@ -65,6 +66,7 @@ target_link_libraries(llprimitive llphysicsextensions ll::colladadom ll::pcre + ll::glh_linear ) #add unit tests -- cgit v1.2.3 From 283c2a20cc4ef856076d287303c7143332b201fe Mon Sep 17 00:00:00 2001 From: Nicky Date: Sun, 1 May 2022 00:38:40 +0200 Subject: Remove setting of HEADER_FILE_ONLY on .h* files, cmake automatically sets the property on those. --- indra/llprimitive/CMakeLists.txt | 3 --- 1 file changed, 3 deletions(-) (limited to 'indra/llprimitive') diff --git a/indra/llprimitive/CMakeLists.txt b/indra/llprimitive/CMakeLists.txt index 698d523dd3..bf35500bad 100644 --- a/indra/llprimitive/CMakeLists.txt +++ b/indra/llprimitive/CMakeLists.txt @@ -47,9 +47,6 @@ set(llprimitive_HEADER_FILES material_codes.h object_flags.h ) - -set_source_files_properties(${llprimitive_HEADER_FILES} - PROPERTIES HEADER_FILE_ONLY TRUE) list(APPEND llprimitive_SOURCE_FILES ${llprimitive_HEADER_FILES}) -- cgit v1.2.3 From 4c3f343799ca4be4b618dca8cf13a86e8941fb44 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Tue, 26 Jul 2022 19:40:10 +0300 Subject: SL-17045 LSL editor cursor position desynchronization 1. Fixed cursor position calculations 2. Fixed selection rect calculation --- indra/llprimitive/llmodel.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra/llprimitive') diff --git a/indra/llprimitive/llmodel.h b/indra/llprimitive/llmodel.h index 3881b1338c..599f19a2a3 100644 --- a/indra/llprimitive/llmodel.h +++ b/indra/llprimitive/llmodel.h @@ -56,6 +56,8 @@ public: mutable std::vector mJointNums; typedef std::vector> matrix_list_t; matrix_list_t mInvBindMatrix; + + // bones/joints position overrides matrix_list_t mAlternateBindMatrix; LL_ALIGN_16(LLMatrix4a mBindShapeMatrix); -- cgit v1.2.3 From 70009d21b2dd51c2c3cc6d9195e048051ca00699 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Wed, 3 Aug 2022 01:46:01 +0300 Subject: SL-17890 Face creation does not clean used arrays --- indra/llprimitive/lldaeloader.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'indra/llprimitive') diff --git a/indra/llprimitive/lldaeloader.cpp b/indra/llprimitive/lldaeloader.cpp index e89690438e..7a138578a5 100644 --- a/indra/llprimitive/lldaeloader.cpp +++ b/indra/llprimitive/lldaeloader.cpp @@ -330,7 +330,10 @@ LLModel::EModelStatus load_face_from_dom_triangles( // VFExtents change face.mExtents[0].set(v[0], v[1], v[2]); face.mExtents[1].set(v[0], v[1], v[2]); - point_map.clear(); + + verts.clear(); + indices.clear(); + point_map.clear(); } } -- cgit v1.2.3 From 68c680599b3ee038a33bcad36ac52912725cf3cd Mon Sep 17 00:00:00 2001 From: Nicky Dasmijn Date: Sat, 17 Sep 2022 11:21:06 +0200 Subject: Try to make sure this also works with the havok version of llphysicsextension. --- indra/llprimitive/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llprimitive') diff --git a/indra/llprimitive/CMakeLists.txt b/indra/llprimitive/CMakeLists.txt index bf35500bad..7d83dc77c1 100644 --- a/indra/llprimitive/CMakeLists.txt +++ b/indra/llprimitive/CMakeLists.txt @@ -60,7 +60,7 @@ target_link_libraries(llprimitive llcorehttp llxml llcharacter - llphysicsextensions + llphysicsextensions_impl ll::colladadom ll::pcre ll::glh_linear -- cgit v1.2.3 From c7366f4c55c6442414eb6c5a6736baf90f1a4700 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Sat, 17 Sep 2022 02:09:04 +0300 Subject: SL-17238 Fix coding policy build issues --- indra/llprimitive/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llprimitive') diff --git a/indra/llprimitive/CMakeLists.txt b/indra/llprimitive/CMakeLists.txt index 7d83dc77c1..d69cd958a0 100644 --- a/indra/llprimitive/CMakeLists.txt +++ b/indra/llprimitive/CMakeLists.txt @@ -63,7 +63,7 @@ target_link_libraries(llprimitive llphysicsextensions_impl ll::colladadom ll::pcre - ll::glh_linear + ll::glh_linear ) #add unit tests -- cgit v1.2.3 From e83146ce0c4310c7a0c03a10b562e7317df034f6 Mon Sep 17 00:00:00 2001 From: Rye Mutt Date: Tue, 27 Sep 2022 16:26:18 -0400 Subject: Optimize away constant map finds in getSkinInfo by caching mesh skin into in vovolume --- indra/llprimitive/llmodel.cpp | 10 ++++++++++ indra/llprimitive/llmodel.h | 3 ++- 2 files changed, 12 insertions(+), 1 deletion(-) (limited to 'indra/llprimitive') diff --git a/indra/llprimitive/llmodel.cpp b/indra/llprimitive/llmodel.cpp index 555164f3b0..444d9a5366 100644 --- a/indra/llprimitive/llmodel.cpp +++ b/indra/llprimitive/llmodel.cpp @@ -1389,6 +1389,16 @@ LLMeshSkinInfo::LLMeshSkinInfo(LLSD& skin): fromLLSD(skin); } +LLMeshSkinInfo::LLMeshSkinInfo(const LLUUID& mesh_id, LLSD& skin) : + mMeshID(mesh_id), + mPelvisOffset(0.0), + mLockScaleIfJointPosition(false), + mInvalidJointsScrubbed(false), + mJointNumsInitialized(false) +{ + fromLLSD(skin); +} + void LLMeshSkinInfo::fromLLSD(LLSD& skin) { if (skin.has("joint_names")) diff --git a/indra/llprimitive/llmodel.h b/indra/llprimitive/llmodel.h index a6ab96ab18..9c99bb75a0 100644 --- a/indra/llprimitive/llmodel.h +++ b/indra/llprimitive/llmodel.h @@ -41,12 +41,13 @@ class domMesh; #define MAX_MODEL_FACES 8 LL_ALIGN_PREFIX(16) -class LLMeshSkinInfo +class LLMeshSkinInfo : public LLRefCount { LL_ALIGN_NEW public: LLMeshSkinInfo(); LLMeshSkinInfo(LLSD& data); + LLMeshSkinInfo(const LLUUID& mesh_id, LLSD& data); void fromLLSD(LLSD& data); LLSD asLLSD(bool include_joints, bool lock_scale_if_joint_position) const; void updateHash(); -- cgit v1.2.3