diff --git a/src/cmake/FindCorrade.cmake b/src/cmake/FindCorrade.cmake index 780932b466..ff3429b2bd 100644 --- a/src/cmake/FindCorrade.cmake +++ b/src/cmake/FindCorrade.cmake @@ -16,6 +16,8 @@ # components, which are: # # Containers - Containers library +# Interconnect - Interconnect library +# Main - Main library # PluginManager - PluginManager library # TestSuite - TestSuite library # Utility - Utility library @@ -590,7 +592,7 @@ if(NOT CMAKE_VERSION VERSION_LESS 3.16) # misleading messages. elseif(NOT _component IN_LIST _CORRADE_IMPLICITLY_ENABLED_COMPONENTS) string(TOUPPER ${_component} _COMPONENT) - list(APPEND _CORRADE_REASON_FAILURE_MESSAGE "${_component} is not built by default. Make sure you enabled WITH_${_COMPONENT} when building Corrade.") + list(APPEND _CORRADE_REASON_FAILURE_MESSAGE "${_component} is not built by default. Make sure you enabled CORRADE_WITH_${_COMPONENT} when building Corrade.") # Otherwise we have no idea. Better be silent than to print something # misleading. else() diff --git a/src/cmake/FindMagnum.cmake b/src/cmake/FindMagnum.cmake index b65de5a790..365dc0d332 100644 --- a/src/cmake/FindMagnum.cmake +++ b/src/cmake/FindMagnum.cmake @@ -1073,7 +1073,7 @@ if(NOT CMAKE_VERSION VERSION_LESS 3.16) # misleading messages. elseif(NOT _component IN_LIST _MAGNUM_IMPLICITLY_ENABLED_COMPONENTS) string(TOUPPER ${_component} _COMPONENT) - list(APPEND _MAGNUM_REASON_FAILURE_MESSAGE "${_component} is not built by default. Make sure you enabled WITH_${_COMPONENT} when building Magnum.") + list(APPEND _MAGNUM_REASON_FAILURE_MESSAGE "${_component} is not built by default. Make sure you enabled MAGNUM_WITH_${_COMPONENT} when building Magnum.") # Otherwise we have no idea. Better be silent than to print something # misleading. else() diff --git a/src/cmake/FindMagnumBindings.cmake b/src/cmake/FindMagnumBindings.cmake index 0bcbb1a8ba..22a48c8461 100644 --- a/src/cmake/FindMagnumBindings.cmake +++ b/src/cmake/FindMagnumBindings.cmake @@ -160,7 +160,7 @@ if(NOT CMAKE_VERSION VERSION_LESS 3.16) # misleading messages. elseif(NOT _component IN_LIST _MAGNUMBINDINGS_IMPLICITLY_ENABLED_COMPONENTS) string(TOUPPER ${_component} _COMPONENT) - list(APPEND _MAGNUMBINDINGS_REASON_FAILURE_MESSAGE "${_component} is not built by default. Make sure you enabled WITH_${_COMPONENT} when building Magnum Bindings") + list(APPEND _MAGNUMBINDINGS_REASON_FAILURE_MESSAGE "${_component} is not built by default. Make sure you enabled MAGNUM_WITH_${_COMPONENT} when building Magnum Bindings") # Otherwise we have no idea. Better be silent than to print something # misleading. else() diff --git a/src/cmake/FindMagnumIntegration.cmake b/src/cmake/FindMagnumIntegration.cmake index f0d535198e..4fb05bf4a8 100644 --- a/src/cmake/FindMagnumIntegration.cmake +++ b/src/cmake/FindMagnumIntegration.cmake @@ -314,7 +314,7 @@ if(NOT CMAKE_VERSION VERSION_LESS 3.16) # misleading messages. elseif(NOT _component IN_LIST _MAGNUMINTEGRATION_IMPLICITLY_ENABLED_COMPONENTS) string(TOUPPER ${_component} _COMPONENT) - list(APPEND _MAGNUMINTEGRATION_REASON_FAILURE_MESSAGE "${_component} is not built by default. Make sure you enabled WITH_${_COMPONENT} when building Magnum Integration.") + list(APPEND _MAGNUMINTEGRATION_REASON_FAILURE_MESSAGE "${_component} is not built by default. Make sure you enabled MAGNUM_WITH_${_COMPONENT} when building Magnum Integration.") # Otherwise we have no idea. Better be silent than to print something # misleading. else() diff --git a/src/cmake/FindMagnumPlugins.cmake b/src/cmake/FindMagnumPlugins.cmake index c3368f44b7..3071651811 100644 --- a/src/cmake/FindMagnumPlugins.cmake +++ b/src/cmake/FindMagnumPlugins.cmake @@ -43,6 +43,7 @@ # StbDxtImageConverter - BC1/BC3 image compressor using stb_dxt # StbImageConverter - Image converter using stb_image_write # StbImageImporter - Image importer using stb_image +# StbResizeImageConverter - Image resizing using stb_image_resize # StbTrueTypeFont - TrueType font using stb_truetype # StbVorbisAudioImporter - OGG audio importer using stb_vorbis # StlImporter - STL importer @@ -165,7 +166,8 @@ set(_MAGNUMPLUGINS_PLUGIN_COMPONENTS OpenGexImporter PngImageConverter PngImporter PrimitiveImporter SpirvToolsShaderConverter StanfordImporter StanfordSceneConverter StbDxtImageConverter StbImageConverter StbImageImporter - StbTrueTypeFont StbVorbisAudioImporter StlImporter WebPImporter) + StbResizeImageConverter StbTrueTypeFont StbVorbisAudioImporter StlImporter + WebPImporter) # Nothing is enabled by default right now set(_MAGNUMPLUGINS_IMPLICITLY_ENABLED_COMPONENTS ) @@ -469,6 +471,7 @@ foreach(_component ${MagnumPlugins_FIND_COMPONENTS}) # StbDxtImageConverter has no dependencies # StbImageConverter has no dependencies # StbImageImporter has no dependencies + # StbResizeImageConverter has no dependencies # StbTrueTypeFont has no dependencies # StbVorbisAudioImporter has no dependencies # StlImporter has no dependencies @@ -547,7 +550,7 @@ if(NOT CMAKE_VERSION VERSION_LESS 3.16) # misleading messages. elseif(NOT _component IN_LIST _MAGNUMPLUGINS_IMPLICITLY_ENABLED_COMPONENTS) string(TOUPPER ${_component} _COMPONENT) - list(APPEND _MAGNUMPLUGINS_REASON_FAILURE_MESSAGE "${_component} is not built by default. Make sure you enabled WITH_${_COMPONENT} when building Magnum Plugins.") + list(APPEND _MAGNUMPLUGINS_REASON_FAILURE_MESSAGE "${_component} is not built by default. Make sure you enabled MAGNUM_WITH_${_COMPONENT} when building Magnum Plugins.") # Otherwise we have no idea. Better be silent than to print something # misleading. else() diff --git a/src/cmake/dependencies.cmake b/src/cmake/dependencies.cmake index 56cc95ef2d..29c1b743d2 100644 --- a/src/cmake/dependencies.cmake +++ b/src/cmake/dependencies.cmake @@ -9,11 +9,11 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_LIST_DIR}") if(NOT USE_SYSTEM_MAGNUM) # These are enabled by default but we don't need them right now -- disabling # for slightly faster builds. If you need any of these, simply delete a line. - set(WITH_INTERCONNECT OFF CACHE BOOL "" FORCE) + set(CORRADE_WITH_INTERCONNECT OFF CACHE BOOL "" FORCE) # Ensure Corrade should be built statically if Magnum is. - set(BUILD_PLUGINS_STATIC ON CACHE BOOL "" FORCE) - set(BUILD_STATIC ON CACHE BOOL "" FORCE) - set(BUILD_STATIC_PIC ON CACHE BOOL "" FORCE) + set(CORRADE_BUILD_PLUGINS_STATIC ON CACHE BOOL "" FORCE) + set(CORRADE_BUILD_STATIC ON CACHE BOOL "" FORCE) + set(CORRADE_BUILD_STATIC_PIC ON CACHE BOOL "" FORCE) add_subdirectory("${DEPS_DIR}/corrade") endif() find_package(Corrade REQUIRED Utility) @@ -190,38 +190,40 @@ endif() # Magnum. Use a system package, if preferred. if(NOT USE_SYSTEM_MAGNUM) - # Magnum is already set to be build statically when Corrade is above. + set(MAGNUM_BUILD_PLUGINS_STATIC ON CACHE BOOL "" FORCE) + set(MAGNUM_BUILD_STATIC ON CACHE BOOL "" FORCE) + set(MAGNUM_BUILD_STATIC_PIC ON CACHE BOOL "" FORCE) # These are enabled by default but we don't need them right now -- disabling # for slightly faster builds. If you need any of these, simply delete a line. - set(WITH_TEXT OFF CACHE BOOL "" FORCE) - set(WITH_TEXTURETOOLS OFF CACHE BOOL "" FORCE) + set(MAGNUM_WITH_TEXT OFF CACHE BOOL "" FORCE) + set(MAGNUM_WITH_TEXTURETOOLS OFF CACHE BOOL "" FORCE) # These are not enabled by default but we need them - set(WITH_ANYSCENEIMPORTER ON CACHE BOOL "WITH_ANYSCENEIMPORTER" FORCE) + set(MAGNUM_WITH_ANYSCENEIMPORTER ON CACHE BOOL "" FORCE) if(BUILD_ASSIMP_SUPPORT) - set(WITH_ASSIMPIMPORTER ON CACHE BOOL "WITH_ASSIMPIMPORTER" FORCE) + set(MAGNUM_WITH_ASSIMPIMPORTER ON CACHE BOOL "" FORCE) endif() - set(WITH_GLTFIMPORTER ON CACHE BOOL "" FORCE) - set(WITH_ANYIMAGEIMPORTER ON CACHE BOOL "WITH_ANYIMAGEIMPORTER" FORCE) - set(WITH_ANYIMAGECONVERTER ON CACHE BOOL "WITH_ANYIMAGECONVERTER" FORCE) - set(WITH_PRIMITIVEIMPORTER ON CACHE BOOL "" FORCE) - set(WITH_STANFORDIMPORTER ON CACHE BOOL "" FORCE) - set(WITH_STBIMAGEIMPORTER ON CACHE BOOL "WITH_STBIMAGEIMPORTER" FORCE) - set(WITH_STBIMAGECONVERTER ON CACHE BOOL "WITH_STBIMAGECONVERTER" FORCE) - set(WITH_EMSCRIPTENAPPLICATION OFF CACHE BOOL "WITH_EMSCRIPTENAPPLICATION" FORCE) - set(WITH_GLFWAPPLICATION OFF CACHE BOOL "WITH_GLFWAPPLICATION" FORCE) - set(WITH_EIGEN ON CACHE BOOL "WITH_EIGEN" FORCE) # Eigen integration - set(WITH_IMGUI ON CACHE BOOL "WITH_IMGUI" FORCE) # ImGui integration + set(MAGNUM_WITH_GLTFIMPORTER ON CACHE BOOL "" FORCE) + set(MAGNUM_WITH_ANYIMAGEIMPORTER ON CACHE BOOL "" FORCE) + set(MAGNUM_WITH_ANYIMAGECONVERTER ON CACHE BOOL "" FORCE) + set(MAGNUM_WITH_PRIMITIVEIMPORTER ON CACHE BOOL "" FORCE) + set(MAGNUM_WITH_STANFORDIMPORTER ON CACHE BOOL "" FORCE) + set(MAGNUM_WITH_STBIMAGEIMPORTER ON CACHE BOOL "" FORCE) + set(MAGNUM_WITH_STBIMAGECONVERTER ON CACHE BOOL "" FORCE) + set(MAGNUM_WITH_EMSCRIPTENAPPLICATION OFF CACHE BOOL "" FORCE) + set(MAGNUM_WITH_GLFWAPPLICATION OFF CACHE BOOL "" FORCE) + set(MAGNUM_WITH_EIGEN ON CACHE BOOL "" FORCE) # Eigen integration + set(MAGNUM_WITH_IMGUI ON CACHE BOOL "" FORCE) # ImGui integration if(BUILD_PYTHON_BINDINGS) - set(WITH_PYTHON ON CACHE BOOL "" FORCE) # Python bindings + set(MAGNUM_WITH_PYTHON ON CACHE BOOL "" FORCE) # Python bindings endif() # We only support WebGL2 if(CORRADE_TARGET_EMSCRIPTEN) - set(TARGET_GLES2 OFF CACHE BOOL "" FORCE) + set(MAGNUM_TARGET_GLES2 OFF CACHE BOOL "" FORCE) endif() if(BUILD_TEST) - set(WITH_OPENGLTESTER ON CACHE BOOL "" FORCE) + set(MAGNUM_WITH_OPENGLTESTER ON CACHE BOOL "" FORCE) endif() # Basis Universal. The repo is extremely huge and so instead of a Git @@ -235,12 +237,12 @@ if(NOT USE_SYSTEM_MAGNUM) CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DBASISD_SUPPORT_BC7_MODE6_OPAQUE_ONLY=0 -DBASISD_SUPPORT_ATC=0 -DBASISD_SUPPORT_FXT1=0 -DBASISD_SUPPORT_PVRTC2=0" ) - set(WITH_BASISIMPORTER ON CACHE BOOL "" FORCE) + set(MAGNUM_WITH_BASISIMPORTER ON CACHE BOOL "" FORCE) if(BUILD_BASIS_COMPRESSOR) # ImageConverter tool for basis - set(WITH_IMAGECONVERTER ON CACHE BOOL "" FORCE) - set(WITH_BASISIMAGECONVERTER ON CACHE BOOL "" FORCE) + set(MAGNUM_WITH_IMAGECONVERTER ON CACHE BOOL "" FORCE) + set(MAGNUM_WITH_BASISIMAGECONVERTER ON CACHE BOOL "" FORCE) endif() # OpenEXR. Use a system package, if preferred. @@ -279,20 +281,20 @@ if(NOT USE_SYSTEM_MAGNUM) set(BUILD_TESTING ${_PREV_BUILD_TESTING}) unset(CMAKE_DEBUG_POSTFIX CACHE) - set(WITH_OPENEXRIMPORTER ON CACHE BOOL "" FORCE) - set(WITH_OPENEXRIMAGECONVERTER ON CACHE BOOL "" FORCE) + set(MAGNUM_WITH_OPENEXRIMPORTER ON CACHE BOOL "" FORCE) + set(MAGNUM_WITH_OPENEXRIMAGECONVERTER ON CACHE BOOL "" FORCE) endif() if(BUILD_WITH_BULLET) # Build Magnum's BulletIntegration - set(WITH_BULLET ON CACHE BOOL "" FORCE) + set(MAGNUM_WITH_BULLET ON CACHE BOOL "" FORCE) else() - set(WITH_BULLET OFF CACHE BOOL "" FORCE) + set(MAGNUM_WITH_BULLET OFF CACHE BOOL "" FORCE) endif() if(BUILD_GUI_VIEWERS) if(CORRADE_TARGET_EMSCRIPTEN) - set(WITH_EMSCRIPTENAPPLICATION ON CACHE BOOL "WITH_EMSCRIPTENAPPLICATION" FORCE) + set(MAGNUM_WITH_EMSCRIPTENAPPLICATION ON CACHE BOOL "" FORCE) else() if(NOT USE_SYSTEM_GLFW) set(GLFW_BUILD_DOCS OFF CACHE BOOL "" FORCE) @@ -301,36 +303,22 @@ if(NOT USE_SYSTEM_MAGNUM) set(GLFW_BUILD_EXAMPLES OFF CACHE BOOL "" FORCE) add_subdirectory("${DEPS_DIR}/glfw") endif() - set(WITH_GLFWAPPLICATION ON CACHE BOOL "WITH_GLFWAPPLICATION" FORCE) + set(MAGNUM_WITH_GLFWAPPLICATION ON CACHE BOOL "" FORCE) endif() endif() if(APPLE) - set(WITH_WINDOWLESSCGLAPPLICATION ON CACHE BOOL "WITH_WINDOWLESSCGLAPPLICATION" - FORCE - ) + set(MAGNUM_WITH_WINDOWLESSCGLAPPLICATION ON CACHE BOOL "" FORCE) elseif(WIN32) - set(WITH_WINDOWLESSWGLAPPLICATION ON CACHE BOOL "WITH_WINDOWLESSWGLAPPLICATION" - FORCE - ) + set(MAGNUM_WITH_WINDOWLESSWGLAPPLICATION ON CACHE BOOL "" FORCE) elseif(CORRADE_TARGET_EMSCRIPTEN) - set(WITH_WINDOWLESSEGLAPPLICATION ON CACHE INTERNAL "WITH_WINDOWLESSEGLAPPLICATION" - FORCE - ) + set(MAGNUM_WITH_WINDOWLESSEGLAPPLICATION ON CACHE INTERNAL "" FORCE) elseif(UNIX) if(BUILD_GUI_VIEWERS) - set(WITH_WINDOWLESSGLXAPPLICATION ON CACHE INTERNAL - "WITH_WINDOWLESSGLXAPPLICATION" FORCE - ) - set(WITH_WINDOWLESSEGLAPPLICATION OFF CACHE INTERNAL - "WITH_WINDOWLESSEGLAPPLICATION" FORCE - ) + set(MAGNUM_WITH_WINDOWLESSGLXAPPLICATION ON CACHE INTERNAL "" FORCE) + set(MAGNUM_WITH_WINDOWLESSEGLAPPLICATION OFF CACHE INTERNAL "" FORCE) else() - set(WITH_WINDOWLESSGLXAPPLICATION OFF CACHE INTERNAL - "WITH_WINDOWLESSGLXAPPLICATION" FORCE - ) - set(WITH_WINDOWLESSEGLAPPLICATION ON CACHE INTERNAL - "WITH_WINDOWLESSEGLAPPLICATION" FORCE - ) + set(MAGNUM_WITH_WINDOWLESSGLXAPPLICATION OFF CACHE INTERNAL "" FORCE) + set(MAGNUM_WITH_WINDOWLESSEGLAPPLICATION ON CACHE INTERNAL "" FORCE) endif() endif() add_subdirectory("${DEPS_DIR}/magnum") diff --git a/src/deps/corrade b/src/deps/corrade index 93922b5d31..04a2c2f51d 160000 --- a/src/deps/corrade +++ b/src/deps/corrade @@ -1 +1 @@ -Subproject commit 93922b5d3165dec7c39a9e432987c870d98d199b +Subproject commit 04a2c2f51d835d031c5267960718d39ba5008982 diff --git a/src/deps/magnum b/src/deps/magnum index 0f063fe86a..527ee0f45d 160000 --- a/src/deps/magnum +++ b/src/deps/magnum @@ -1 +1 @@ -Subproject commit 0f063fe86a14acf37d4ca3a4a70c016524ce2ed7 +Subproject commit 527ee0f45d3414f23cf6f16f75c5cd4cf4ac6664 diff --git a/src/deps/magnum-bindings b/src/deps/magnum-bindings index 0a32aa0ed7..704c904d6a 160000 --- a/src/deps/magnum-bindings +++ b/src/deps/magnum-bindings @@ -1 +1 @@ -Subproject commit 0a32aa0ed7ad8bd0f2c95f1bedbe7e72db462ad5 +Subproject commit 704c904d6a5a279e31718ad7778556f2f155b78e diff --git a/src/deps/magnum-integration b/src/deps/magnum-integration index 6fa1a7754b..79747545db 160000 --- a/src/deps/magnum-integration +++ b/src/deps/magnum-integration @@ -1 +1 @@ -Subproject commit 6fa1a7754bf8bc612befdc9ec543f8420a0111cc +Subproject commit 79747545dbe711055f7f06bcf6ac5c76541ab6c0 diff --git a/src/deps/magnum-plugins b/src/deps/magnum-plugins index bd90aaeb1f..0d5bd5a7ce 160000 --- a/src/deps/magnum-plugins +++ b/src/deps/magnum-plugins @@ -1 +1 @@ -Subproject commit bd90aaeb1f93eedf71ca6d9570916c8c74922bde +Subproject commit 0d5bd5a7ceac42e3790bfbe3c5f3c058b171bfa0 diff --git a/src/esp/assets/ResourceManager.cpp b/src/esp/assets/ResourceManager.cpp index 6e59630840..7cc5faefc7 100644 --- a/src/esp/assets/ResourceManager.cpp +++ b/src/esp/assets/ResourceManager.cpp @@ -2427,8 +2427,8 @@ Mn::Image2D ResourceManager::convertRGBToSemanticId( Mn::Image2D resImage{ Mn::PixelFormat::R16UI, size, Cr::Containers::Array{ - Mn::NoInit, - std::size_t(size.product() * pixelSize(Mn::PixelFormat::R16UI))}}; + Mn::NoInit, std::size_t(size.product() * + pixelFormatSize(Mn::PixelFormat::R16UI))}}; Cr::Containers::StridedArrayView2D input = srcImage.pixels();