From 3fd2452dd0ae6260edc9cde2f716cb5ec221b493 Mon Sep 17 00:00:00 2001 From: Adam Celarek <5292991+adam-ce@users.noreply.github.com> Date: Mon, 13 Nov 2023 19:53:56 +0100 Subject: [PATCH 01/10] file changed on server --- unittests/nucleus_tile_scheduler_tile_load_service.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unittests/nucleus_tile_scheduler_tile_load_service.cpp b/unittests/nucleus_tile_scheduler_tile_load_service.cpp index aa075b58..d588d499 100644 --- a/unittests/nucleus_tile_scheduler_tile_load_service.cpp +++ b/unittests/nucleus_tile_scheduler_tile_load_service.cpp @@ -183,7 +183,7 @@ TEST_CASE("nucleus/tile_scheduler/TileLoadService") // manually checked. comparing the sum should find regressions. this test will fail when the file changes. // image.save("/home/madam/Documents/work/tuw/alpinemaps/" // "build-alpine-renderer-Desktop_Qt_6_2_3_GCC_64bit-Debug/test.jpeg"); - CHECK(std::accumulate(image.constBits(), image.constBits() + image.sizeInBytes(), 0LLu) == 34'880'685LLu); + CHECK(std::accumulate(image.constBits(), image.constBits() + image.sizeInBytes(), 0LLu) == 36'889'463LLu); } } #ifndef __EMSCRIPTEN__ From b4748f11c0ab2344bdce0a053e599c6a0c086142 Mon Sep 17 00:00:00 2001 From: Adam Celarek <5292991+adam-ce@users.noreply.github.com> Date: Mon, 13 Nov 2023 20:17:19 +0100 Subject: [PATCH 02/10] add radix repo + download tl_expected to extern --- nucleus/CMakeLists.txt | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/nucleus/CMakeLists.txt b/nucleus/CMakeLists.txt index b7aaca35..b8bebce8 100644 --- a/nucleus/CMakeLists.txt +++ b/nucleus/CMakeLists.txt @@ -1,12 +1,38 @@ cmake_minimum_required(VERSION 3.21) project(alpine-renderer-nucleus LANGUAGES CXX) +option(ALP_AUTOUPDATE_RADIX "Keeps whack up-to-date with origin/main, but prevents local edits. Change to OFF if you want to edit radix" TRUE) + include(FetchContent) + +message("ALP_EXTERN_DIR=${ALP_EXTERN_DIR}") +if(ALP_AUTOUPDATE_RADIX) + FetchContent_Declare(radix + GIT_REPOSITORY https://github.com/AlpineMapsOrg/renderer.git + GIT_TAG origin/main + SOURCE_DIR ${CMAKE_SOURCE_DIR}/extern/radix + SOURCE_SUBDIR src + ) + FetchContent_MakeAvailable(radix) +else() + if (NOT EXISTS ${CMAKE_SOURCE_DIR}/extern/radix) + FetchContent_Declare(radix + GIT_REPOSITORY git@github.com:AlpineMapsOrg/radix.git + GIT_TAG main + SOURCE_DIR ${CMAKE_SOURCE_DIR}/extern/radix + ) + FetchContent_MakeAvailable(radix) + else() + add_subdirectory(${CMAKE_SOURCE_DIR}/extern/radix ${CMAKE_BINARY_DIR}/_deps/radix-build) + endif() +endif() + set(EXPECTED_BUILD_TESTS OFF CACHE BOOL "Enable tl::expected tests") FetchContent_Declare(tl_expected URL https://github.com/TartanLlama/expected/archive/refs/tags/v1.1.0.zip URL_HASH MD5=cbc9465bb0e9328c821fc3cf89ec7711 DOWNLOAD_EXTRACT_TIMESTAMP true + SOURCE_DIR ${CMAKE_SOURCE_DIR}/extern/tl_expected ) FetchContent_MakeAvailable(tl_expected) From 87ec8486a9ea3c3119675020337d745bc8189edc Mon Sep 17 00:00:00 2001 From: Adam Celarek <5292991+adam-ce@users.noreply.github.com> Date: Mon, 13 Nov 2023 21:02:08 +0100 Subject: [PATCH 03/10] correct some urls, switch to radix, update cmake usage, switch to url download (faster) --- CMakeLists.txt | 6 +++--- nucleus/CMakeLists.txt | 21 ++++++++++----------- 2 files changed, 13 insertions(+), 14 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a50a8f95..b0838de8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.21) +cmake_minimum_required(VERSION 3.24) project(alpine-renderer LANGUAGES CXX) option(ALP_UNITTESTS "include unit test targets in the buildsystem" ON) @@ -7,6 +7,8 @@ option(ALP_ENABLE_THREAD_SANITIZER "compiles atb with thread sanitizer enabled ( option(ALP_ENABLE_ASSERTS "enable asserts (do not define NDEBUG)" ON) option(ALP_ENABLE_TRACK_OBJECT_LIFECYCLE "enables debug cmd printout of constructors & deconstructors if implemented" OFF) +set(ALP_EXTERN_DIR "extern" CACHE STRING "name of the directory to store external libraries, fonts etc..") + if(ALP_ENABLE_TRACK_OBJECT_LIFECYCLE) add_definitions(-DALP_ENABLE_TRACK_OBJECT_LIFECYCLE) endif() @@ -80,7 +82,6 @@ FetchContent_MakeAvailable(alpine_height_data alpineapp_fonts fmt zppbits) if (ANDROID) FetchContent_Declare( android_openssl - DOWNLOAD_EXTRACT_TIMESTAMP true URL https://github.com/AlpineMapsOrg/android_openssl/archive/refs/heads/issams_fixes.zip # URL_HASH MD5=88dd38c0fc94a195ae3f29412cfdcf2b ) @@ -93,7 +94,6 @@ target_include_directories(zppbits INTERFACE ${zppbits_SOURCE_DIR}) ########################################### projects ################################################# -add_subdirectory(sherpa) # pulls in Catch2 and glm add_subdirectory(nucleus) add_subdirectory(gl_engine) add_subdirectory(plain_renderer) diff --git a/nucleus/CMakeLists.txt b/nucleus/CMakeLists.txt index b8bebce8..105f6786 100644 --- a/nucleus/CMakeLists.txt +++ b/nucleus/CMakeLists.txt @@ -5,34 +5,33 @@ option(ALP_AUTOUPDATE_RADIX "Keeps whack up-to-date with origin/main, but preven include(FetchContent) -message("ALP_EXTERN_DIR=${ALP_EXTERN_DIR}") if(ALP_AUTOUPDATE_RADIX) FetchContent_Declare(radix - GIT_REPOSITORY https://github.com/AlpineMapsOrg/renderer.git + GIT_REPOSITORY https://github.com/AlpineMapsOrg/radix.git GIT_TAG origin/main - SOURCE_DIR ${CMAKE_SOURCE_DIR}/extern/radix + SOURCE_DIR ${CMAKE_SOURCE_DIR}/${ALP_EXTERN_DIR}/radix SOURCE_SUBDIR src ) FetchContent_MakeAvailable(radix) else() - if (NOT EXISTS ${CMAKE_SOURCE_DIR}/extern/radix) + if (NOT EXISTS ${CMAKE_SOURCE_DIR}/${ALP_EXTERN_DIR}/radix) FetchContent_Declare(radix GIT_REPOSITORY git@github.com:AlpineMapsOrg/radix.git GIT_TAG main - SOURCE_DIR ${CMAKE_SOURCE_DIR}/extern/radix + SOURCE_DIR ${CMAKE_SOURCE_DIR}/${ALP_EXTERN_DIR}/radix ) FetchContent_MakeAvailable(radix) else() - add_subdirectory(${CMAKE_SOURCE_DIR}/extern/radix ${CMAKE_BINARY_DIR}/_deps/radix-build) + add_subdirectory(${CMAKE_SOURCE_DIR}/${ALP_EXTERN_DIR}/radix ${CMAKE_BINARY_DIR}/_deps/radix-build) endif() endif() set(EXPECTED_BUILD_TESTS OFF CACHE BOOL "Enable tl::expected tests") FetchContent_Declare(tl_expected - URL https://github.com/TartanLlama/expected/archive/refs/tags/v1.1.0.zip - URL_HASH MD5=cbc9465bb0e9328c821fc3cf89ec7711 - DOWNLOAD_EXTRACT_TIMESTAMP true - SOURCE_DIR ${CMAKE_SOURCE_DIR}/extern/tl_expected + URL https://github.com/TartanLlama/expected/archive/refs/tags/v1.1.0.zip + URL_HASH MD5=cbc9465bb0e9328c821fc3cf89ec7711 + SOURCE_DIR ${CMAKE_SOURCE_DIR}/${ALP_EXTERN_DIR}/tl_expected + DOWNLOAD_DIR ${CMAKE_SOURCE_DIR}/${ALP_EXTERN_DIR}/tl_expected ) FetchContent_MakeAvailable(tl_expected) @@ -85,7 +84,7 @@ qt_add_library(nucleus STATIC ) target_include_directories(nucleus PRIVATE . PUBLIC ${CMAKE_SOURCE_DIR}) -target_link_libraries(nucleus PUBLIC sherpa Qt::Core Qt::Gui Qt::Network Qt::Svg fmt::fmt zppbits expected) +target_link_libraries(nucleus PUBLIC radix Qt::Core Qt::Gui Qt::Network Qt::Svg fmt::fmt zppbits expected) if (EMSCRIPTEN) From cf1e238101a9af8f39347726eb6151b0953290e6 Mon Sep 17 00:00:00 2001 From: Adam Celarek <5292991+adam-ce@users.noreply.github.com> Date: Mon, 13 Nov 2023 22:00:45 +0100 Subject: [PATCH 04/10] try making cmake fetch more verbose (it looked like it's stalling) --- .gitignore | 1 + CMakeLists.txt | 6 ++++-- unittests/CMakeLists.txt | 8 ++++++++ unittests_gl/CMakeLists.txt | 8 ++++++++ 4 files changed, 21 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 02821b4a..e3709844 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /CMakeLists.txt.user +/extern/* diff --git a/CMakeLists.txt b/CMakeLists.txt index b0838de8..0c3be424 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -35,6 +35,8 @@ set(CMAKE_AUTOMOC ON) set(CMAKE_AUTORCC ON) set(CMAKE_AUTOUIC ON) +set(FETCHCONTENT_QUIET FALSE) + if (ALP_ENABLE_ADDRESS_SANITIZER) message(NOTICE "building with address sanitizer enabled") set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fno-omit-frame-pointer -fsanitize=address") @@ -74,8 +76,8 @@ FetchContent_Declare( URL https://github.com/adobe-fonts/source-sans/archive/refs/heads/release.zip URL_HASH MD5=681612d5ad33731c512ce056d2ca2297 ) -FetchContent_Declare(fmt GIT_REPOSITORY https://github.com/fmtlib/fmt.git) -FetchContent_Declare(zppbits GIT_REPOSITORY https://github.com/eyalz800/zpp_bits.git GIT_TAG main) +FetchContent_Declare(fmt GIT_REPOSITORY https://github.com/fmtlib/fmt.git GIT_PROGRESS TRUE) +FetchContent_Declare(zppbits GIT_REPOSITORY https://github.com/eyalz800/zpp_bits.git GIT_TAG main GIT_PROGRESS TRUE) FetchContent_MakeAvailable(alpine_height_data alpineapp_fonts fmt zppbits) diff --git a/unittests/CMakeLists.txt b/unittests/CMakeLists.txt index 4df5e0b0..a530f8a2 100644 --- a/unittests/CMakeLists.txt +++ b/unittests/CMakeLists.txt @@ -1,6 +1,14 @@ cmake_minimum_required(VERSION 3.21) project(alpine-renderer-unittests_nucleus LANGUAGES CXX) +FetchContent_Declare(catch2 + DOWNLOAD_EXTRACT_TIMESTAMP true + URL https://github.com/catchorg/Catch2/archive/refs/tags/v3.4.0.tar.gz + URL_HASH MD5=2c802a4938ed842e2942c60d1d231bb7 + SOURCE_DIR ${CMAKE_SOURCE_DIR}/extern/Catch2 +) +FetchContent_MakeAvailable(catch2) + qt_add_executable(unittests_nucleus main.cpp catch2_helpers.h diff --git a/unittests_gl/CMakeLists.txt b/unittests_gl/CMakeLists.txt index 0160cc6e..e0fefbf1 100644 --- a/unittests_gl/CMakeLists.txt +++ b/unittests_gl/CMakeLists.txt @@ -1,6 +1,14 @@ cmake_minimum_required(VERSION 3.21) project(alpine-renderer-unittests_gl_engine LANGUAGES CXX) +FetchContent_Declare(catch2 + DOWNLOAD_EXTRACT_TIMESTAMP true + URL https://github.com/catchorg/Catch2/archive/refs/tags/v3.4.0.tar.gz + URL_HASH MD5=2c802a4938ed842e2942c60d1d231bb7 + SOURCE_DIR ${CMAKE_SOURCE_DIR}/extern/Catch2 +) +FetchContent_MakeAvailable(catch2) + qt_add_executable(unittests_gl_engine UnittestGlWindow.h UnittestGlWindow.cpp main.cpp From e6b4834823e21d34ead24e5383dc7f19587c2a3d Mon Sep 17 00:00:00 2001 From: Adam Celarek <5292991+adam-ce@users.noreply.github.com> Date: Mon, 13 Nov 2023 22:49:17 +0100 Subject: [PATCH 05/10] move some of the dependencies from the main cmake to nucleus, use http download instead of git. --- CMakeLists.txt | 33 ++++++++++++++++----------------- nucleus/CMakeLists.txt | 19 +++++++++++++++++-- 2 files changed, 33 insertions(+), 19 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0c3be424..a8f7c011 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,6 +6,7 @@ option(ALP_ENABLE_ADDRESS_SANITIZER "compiles atb with address sanitizer enabled option(ALP_ENABLE_THREAD_SANITIZER "compiles atb with thread sanitizer enabled (only debug, works only on g++ and clang)" OFF) option(ALP_ENABLE_ASSERTS "enable asserts (do not define NDEBUG)" ON) option(ALP_ENABLE_TRACK_OBJECT_LIFECYCLE "enables debug cmd printout of constructors & deconstructors if implemented" OFF) +option(ALP_USE_NOISY_CMAKE_DOWNLOAD "we download quite a lot when running cmake the first time. if this option is off, it may look like cmake stalled." ON) set(ALP_EXTERN_DIR "extern" CACHE STRING "name of the directory to store external libraries, fonts etc..") @@ -35,7 +36,11 @@ set(CMAKE_AUTOMOC ON) set(CMAKE_AUTORCC ON) set(CMAKE_AUTOUIC ON) -set(FETCHCONTENT_QUIET FALSE) +if (ALP_USE_NOISY_CMAKE_DOWNLOAD) + set(FETCHCONTENT_QUIET FALSE) +else() + set(FETCHCONTENT_QUIET TRUE) +endif() if (ALP_ENABLE_ADDRESS_SANITIZER) message(NOTICE "building with address sanitizer enabled") @@ -62,24 +67,20 @@ if (ALP_UNITTESTS) find_package(Qt6 REQUIRED COMPONENTS Test) endif() - include(FetchContent) -FetchContent_Declare( - alpine_height_data - URL https://gataki.cg.tuwien.ac.at/tiles/alpine_png2/height_data.atb - DOWNLOAD_NO_EXTRACT true - URL_HASH MD5=f5458b48ade5d6aaf980fcfc5b6be29a +FetchContent_Declare(alpine_height_data + DOWNLOAD_NO_EXTRACT true + URL https://gataki.cg.tuwien.ac.at/tiles/alpine_png2/height_data.atb + URL_HASH MD5=f5458b48ade5d6aaf980fcfc5b6be29a + SOURCE_DIR ${CMAKE_SOURCE_DIR}/${ALP_EXTERN_DIR}/alpine_height_data ) -FetchContent_Declare( - alpineapp_fonts +FetchContent_Declare(alpineapp_fonts DOWNLOAD_EXTRACT_TIMESTAMP true - URL https://github.com/adobe-fonts/source-sans/archive/refs/heads/release.zip - URL_HASH MD5=681612d5ad33731c512ce056d2ca2297 + URL https://github.com/adobe-fonts/source-sans/archive/refs/heads/release.zip + URL_HASH MD5=681612d5ad33731c512ce056d2ca2297 + SOURCE_DIR ${CMAKE_SOURCE_DIR}/${ALP_EXTERN_DIR}/alpineapp_fonts ) -FetchContent_Declare(fmt GIT_REPOSITORY https://github.com/fmtlib/fmt.git GIT_PROGRESS TRUE) -FetchContent_Declare(zppbits GIT_REPOSITORY https://github.com/eyalz800/zpp_bits.git GIT_TAG main GIT_PROGRESS TRUE) - -FetchContent_MakeAvailable(alpine_height_data alpineapp_fonts fmt zppbits) +FetchContent_MakeAvailable(alpine_height_data alpineapp_fonts) if (ANDROID) FetchContent_Declare( @@ -91,8 +92,6 @@ if (ANDROID) include(${android_openssl_SOURCE_DIR}/android_openssl.cmake) endif() -add_library(zppbits INTERFACE) -target_include_directories(zppbits INTERFACE ${zppbits_SOURCE_DIR}) ########################################### projects ################################################# diff --git a/nucleus/CMakeLists.txt b/nucleus/CMakeLists.txt index 105f6786..b16176ec 100644 --- a/nucleus/CMakeLists.txt +++ b/nucleus/CMakeLists.txt @@ -26,14 +26,29 @@ else() endif() endif() +message("###################ALP_EXTERN_DIR = ${ALP_EXTERN_DIR}") set(EXPECTED_BUILD_TESTS OFF CACHE BOOL "Enable tl::expected tests") FetchContent_Declare(tl_expected + DOWNLOAD_EXTRACT_TIMESTAMP true URL https://github.com/TartanLlama/expected/archive/refs/tags/v1.1.0.zip URL_HASH MD5=cbc9465bb0e9328c821fc3cf89ec7711 SOURCE_DIR ${CMAKE_SOURCE_DIR}/${ALP_EXTERN_DIR}/tl_expected - DOWNLOAD_DIR ${CMAKE_SOURCE_DIR}/${ALP_EXTERN_DIR}/tl_expected ) -FetchContent_MakeAvailable(tl_expected) +FetchContent_Declare(fmt + DOWNLOAD_EXTRACT_TIMESTAMP true + URL https://github.com/fmtlib/fmt/releases/download/10.1.0/fmt-10.1.0.zip + URL_HASH MD5=56eaffa1e2a2afe29e9cb2348a446e63 + SOURCE_DIR ${CMAKE_SOURCE_DIR}/${ALP_EXTERN_DIR}/fmt +) +FetchContent_Declare(zppbits + DOWNLOAD_EXTRACT_TIMESTAMP true + URL https://github.com/eyalz800/zpp_bits/archive/refs/heads/main.zip + SOURCE_DIR ${CMAKE_SOURCE_DIR}/${ALP_EXTERN_DIR}/zppbits +) +FetchContent_MakeAvailable(tl_expected fmt zppbits) + +add_library(zppbits INTERFACE) +target_include_directories(zppbits INTERFACE ${zppbits_SOURCE_DIR}) qt_add_library(nucleus STATIC AbstractRenderWindow.h AbstractRenderWindow.cpp From ba68a90dd1bc84e217c836fea2e7558ad465b4b6 Mon Sep 17 00:00:00 2001 From: Adam Celarek <5292991+adam-ce@users.noreply.github.com> Date: Mon, 13 Nov 2023 23:41:00 +0100 Subject: [PATCH 06/10] remove sherpa --- .gitmodules | 3 --- sherpa | 1 - 2 files changed, 4 deletions(-) delete mode 160000 sherpa diff --git a/.gitmodules b/.gitmodules index e4034fd1..e69de29b 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +0,0 @@ -[submodule "sherpa"] - path = sherpa - url = git@github.com:AlpineMapsOrg/sherpa.git diff --git a/sherpa b/sherpa deleted file mode 160000 index eaf6c6ce..00000000 --- a/sherpa +++ /dev/null @@ -1 +0,0 @@ -Subproject commit eaf6c6cef4f1b5a79571be6929f9f513a03caf0d From f8ee4352da37963d3c3bce01f2fa8b7a0ded722e Mon Sep 17 00:00:00 2001 From: Adam Celarek <5292991+adam-ce@users.noreply.github.com> Date: Tue, 14 Nov 2023 00:10:11 +0100 Subject: [PATCH 07/10] remove sherpa v2 --- gl_engine/TileSet.h | 2 +- nucleus/Controller.cpp | 5 +---- nucleus/Tile.h | 2 +- nucleus/camera/Definition.cpp | 2 +- nucleus/camera/Definition.h | 11 +++++------ nucleus/srs.h | 2 +- nucleus/tile_scheduler/Cache.h | 2 +- nucleus/tile_scheduler/DrawListGenerator.cpp | 6 +++--- nucleus/tile_scheduler/QuadAssembler.h | 2 +- nucleus/tile_scheduler/RateLimiter.h | 2 +- nucleus/tile_scheduler/Scheduler.cpp | 2 +- nucleus/tile_scheduler/Scheduler.h | 2 +- nucleus/tile_scheduler/SlotLimiter.h | 2 +- nucleus/tile_scheduler/cache_quieries.h | 4 ++-- nucleus/tile_scheduler/tile_types.h | 2 +- nucleus/tile_scheduler/utils.h | 4 ++-- unittests/cache_queries.cpp | 4 ++-- unittests/catch2_helpers.h | 2 +- unittests/nucleus_tile_scheduler_cache.cpp | 2 +- unittests/nucleus_tile_scheduler_scheduler.cpp | 2 +- unittests/nucleus_tile_scheduler_slot_limiter.cpp | 2 +- unittests/nucleus_tile_scheduler_util.cpp | 2 +- unittests/test_Camera.cpp | 2 +- unittests/test_DrawListGenerator.cpp | 4 ++-- unittests/test_zppbits.cpp | 2 +- 25 files changed, 35 insertions(+), 39 deletions(-) diff --git a/gl_engine/TileSet.h b/gl_engine/TileSet.h index 7ffde903..02be6a56 100644 --- a/gl_engine/TileSet.h +++ b/gl_engine/TileSet.h @@ -26,7 +26,7 @@ #include #include -#include "sherpa/tile.h" +#include "radix/tile.h" // we want to be flexible and have the ability to draw several tiles at once. // GpuTileSets can have an arbitrary number of slots, each slot is an index in the corresponding diff --git a/nucleus/Controller.cpp b/nucleus/Controller.cpp index 61f9ad5e..0896df86 100644 --- a/nucleus/Controller.cpp +++ b/nucleus/Controller.cpp @@ -36,7 +36,7 @@ #include "nucleus/tile_scheduler/SlotLimiter.h" #include "nucleus/tile_scheduler/TileLoadService.h" #include "nucleus/tile_scheduler/utils.h" -#include "sherpa/TileHeights.h" +#include "radix/TileHeights.h" using namespace nucleus::tile_scheduler; @@ -128,9 +128,6 @@ Controller::Controller(AbstractRenderWindow* render_window) connect(m_tile_scheduler.get(), &Scheduler::gpu_quads_updated, m_render_window, &AbstractRenderWindow::update_gpu_quads); connect(m_tile_scheduler.get(), &Scheduler::gpu_quads_updated, m_render_window, &AbstractRenderWindow::update_requested); - /// @todo: finish tile/cache_querier: find rgb to float, probably move to sherpa; finsih test tile generator for a specified height; finish tests + impl - /// @todo: use cache_querier for target location altitude, and use for look at - /// @todo: make fly to animation, modelled on rotation. m_camera_controller->update(); } diff --git a/nucleus/Tile.h b/nucleus/Tile.h index bf8ff156..07a08a26 100644 --- a/nucleus/Tile.h +++ b/nucleus/Tile.h @@ -4,7 +4,7 @@ #include #include "Raster.h" -#include "sherpa/tile.h" +#include "radix/tile.h" namespace nucleus { struct Tile { diff --git a/nucleus/camera/Definition.cpp b/nucleus/camera/Definition.cpp index 1c5d0cf6..c483567d 100644 --- a/nucleus/camera/Definition.cpp +++ b/nucleus/camera/Definition.cpp @@ -25,7 +25,7 @@ #include #include -#include "sherpa/geometry.h" +#include "radix/geometry.h" // camera space in opengl / webgl: // origin: diff --git a/nucleus/camera/Definition.h b/nucleus/camera/Definition.h index 83f38104..b819fddc 100644 --- a/nucleus/camera/Definition.h +++ b/nucleus/camera/Definition.h @@ -24,14 +24,13 @@ #include #include -#include +#include + namespace nucleus::camera { -namespace nucleus::camera { - -struct Frustum { - std::array, 6> clipping_planes; // the order of clipping panes is front, back, top, down, left, and right - std::array corners; // the order of corners is ccw, starting from top left, front plane -> back plane + struct Frustum { + std::array, 6> clipping_planes; // the order of clipping panes is front, back, top, down, left, and right + std::array corners; // the order of corners is ccw, starting from top left, front plane -> back plane }; class Definition { diff --git a/nucleus/srs.h b/nucleus/srs.h index 681d91a6..b38d52f9 100644 --- a/nucleus/srs.h +++ b/nucleus/srs.h @@ -23,7 +23,7 @@ #include -#include "sherpa/tile.h" +#include "radix/tile.h" namespace nucleus::srs { // the srs used for the alpine renderer is EPSG: 3857 (also called web mercator, spherical mercator). diff --git a/nucleus/tile_scheduler/Cache.h b/nucleus/tile_scheduler/Cache.h index cfc850d3..8128ab1e 100644 --- a/nucleus/tile_scheduler/Cache.h +++ b/nucleus/tile_scheduler/Cache.h @@ -30,7 +30,7 @@ #include #include -#include "sherpa/tile.h" +#include "radix/tile.h" #include "tile_types.h" #include "utils.h" diff --git a/nucleus/tile_scheduler/DrawListGenerator.cpp b/nucleus/tile_scheduler/DrawListGenerator.cpp index 09c796bd..d7add86f 100644 --- a/nucleus/tile_scheduler/DrawListGenerator.cpp +++ b/nucleus/tile_scheduler/DrawListGenerator.cpp @@ -18,8 +18,8 @@ #include "DrawListGenerator.h" -#include "sherpa/iterator.h" -#include "sherpa/quad_tree.h" +#include "radix/iterator.h" +#include "radix/quad_tree.h" using nucleus::tile_scheduler::DrawListGenerator; @@ -74,6 +74,6 @@ DrawListGenerator::TileSet DrawListGenerator::generate_for(const nucleus::camera return tile_scheduler::utils::camera_frustum_contains_tile(camera_frustum, m_aabb_decorator->aabb(tile)); }; - std::copy_if(all_leaves.begin(), all_leaves.end(), sherpa::unordered_inserter(visible_leaves), is_visible); + std::copy_if(all_leaves.begin(), all_leaves.end(), radix::unordered_inserter(visible_leaves), is_visible); return visible_leaves; } diff --git a/nucleus/tile_scheduler/QuadAssembler.h b/nucleus/tile_scheduler/QuadAssembler.h index 68a5a8f0..b7365132 100644 --- a/nucleus/tile_scheduler/QuadAssembler.h +++ b/nucleus/tile_scheduler/QuadAssembler.h @@ -22,7 +22,7 @@ #include -#include "sherpa/tile.h" +#include "radix/tile.h" #include "tile_types.h" namespace nucleus::tile_scheduler { diff --git a/nucleus/tile_scheduler/RateLimiter.h b/nucleus/tile_scheduler/RateLimiter.h index d7d079b4..f02c5323 100644 --- a/nucleus/tile_scheduler/RateLimiter.h +++ b/nucleus/tile_scheduler/RateLimiter.h @@ -22,7 +22,7 @@ #include -#include +#include class QTimer; diff --git a/nucleus/tile_scheduler/Scheduler.cpp b/nucleus/tile_scheduler/Scheduler.cpp index 1bf11261..05f27048 100644 --- a/nucleus/tile_scheduler/Scheduler.cpp +++ b/nucleus/tile_scheduler/Scheduler.cpp @@ -30,7 +30,7 @@ #include "nucleus/tile_scheduler/utils.h" #include "nucleus/utils/tile_conversion.h" -#include "sherpa/quad_tree.h" +#include "radix/quad_tree.h" using namespace nucleus::tile_scheduler; diff --git a/nucleus/tile_scheduler/Scheduler.h b/nucleus/tile_scheduler/Scheduler.h index 927f35a9..96032a1d 100644 --- a/nucleus/tile_scheduler/Scheduler.h +++ b/nucleus/tile_scheduler/Scheduler.h @@ -24,7 +24,7 @@ #include #include "nucleus/camera/Definition.h" -#include "sherpa/tile.h" +#include "radix/tile.h" #include "Cache.h" #include "tile_types.h" diff --git a/nucleus/tile_scheduler/SlotLimiter.h b/nucleus/tile_scheduler/SlotLimiter.h index 9367cd0b..426ca5c2 100644 --- a/nucleus/tile_scheduler/SlotLimiter.h +++ b/nucleus/tile_scheduler/SlotLimiter.h @@ -22,7 +22,7 @@ #include -#include +#include #include "tile_types.h" diff --git a/nucleus/tile_scheduler/cache_quieries.h b/nucleus/tile_scheduler/cache_quieries.h index 31ba9a34..096605ff 100644 --- a/nucleus/tile_scheduler/cache_quieries.h +++ b/nucleus/tile_scheduler/cache_quieries.h @@ -20,7 +20,7 @@ #include "nucleus/srs.h" #include "nucleus/tile_scheduler/Cache.h" -#include "sherpa/height_encoding.h" +#include "radix/height_encoding.h" #include @@ -49,7 +49,7 @@ inline float query_altitude(MemoryCache* cache, const glm::dvec2& lat_long) const auto x = int(uv.x * height_tile.width()); const auto y = int(uv.y * height_tile.height()); const auto rgb = QColor(height_tile.pixel(x, y)); - return sherpa::height_encoding::to_float({rgb.red(), rgb.green(), rgb.blue()}); + return radix::height_encoding::to_float({rgb.red(), rgb.green(), rgb.blue()}); } } diff --git a/nucleus/tile_scheduler/tile_types.h b/nucleus/tile_scheduler/tile_types.h index 0b651420..c5d7054d 100644 --- a/nucleus/tile_scheduler/tile_types.h +++ b/nucleus/tile_scheduler/tile_types.h @@ -19,7 +19,7 @@ #pragma once #include "nucleus/tile_scheduler/utils.h" -#include "sherpa/tile.h" +#include "radix/tile.h" #include diff --git a/nucleus/tile_scheduler/utils.h b/nucleus/tile_scheduler/utils.h index ff9ee9eb..09d28f8d 100644 --- a/nucleus/tile_scheduler/utils.h +++ b/nucleus/tile_scheduler/utils.h @@ -27,8 +27,8 @@ #include "constants.h" #include "nucleus/camera/Definition.h" #include "nucleus/srs.h" -#include "sherpa/TileHeights.h" -#include "sherpa/geometry.h" +#include "radix/TileHeights.h" +#include "radix/geometry.h" namespace nucleus::tile_scheduler { diff --git a/unittests/cache_queries.cpp b/unittests/cache_queries.cpp index 486d6910..16b939a6 100644 --- a/unittests/cache_queries.cpp +++ b/unittests/cache_queries.cpp @@ -20,7 +20,7 @@ #include "nucleus/tile_scheduler/Scheduler.h" #include "nucleus/tile_scheduler/cache_quieries.h" #include "nucleus/tile_scheduler/tile_types.h" -#include "sherpa/height_encoding.h" +#include "radix/height_encoding.h" #include @@ -34,7 +34,7 @@ namespace { QByteArray png_tile(unsigned size, float altitude) { QImage tile(QSize{int(size), int(size)}, QImage::Format_ARGB32); - const auto rgb = sherpa::height_encoding::to_rgb(altitude); + const auto rgb = radix::height_encoding::to_rgb(altitude); tile.fill(QColor(rgb.x, rgb.y, rgb.z)); QByteArray arr; QBuffer buffer(&arr); diff --git a/unittests/catch2_helpers.h b/unittests/catch2_helpers.h index a360e8b1..8c8f7737 100644 --- a/unittests/catch2_helpers.h +++ b/unittests/catch2_helpers.h @@ -21,7 +21,7 @@ #include -#include "sherpa/tile.h" +#include "radix/tile.h" namespace Catch { diff --git a/unittests/nucleus_tile_scheduler_cache.cpp b/unittests/nucleus_tile_scheduler_cache.cpp index 71eafcc4..db86a23c 100644 --- a/unittests/nucleus_tile_scheduler_cache.cpp +++ b/unittests/nucleus_tile_scheduler_cache.cpp @@ -25,7 +25,7 @@ #include #include "nucleus/tile_scheduler/Cache.h" -#include "sherpa/tile.h" +#include "radix/tile.h" namespace { diff --git a/unittests/nucleus_tile_scheduler_scheduler.cpp b/unittests/nucleus_tile_scheduler_scheduler.cpp index f9d3b503..21bf9786 100644 --- a/unittests/nucleus_tile_scheduler_scheduler.cpp +++ b/unittests/nucleus_tile_scheduler_scheduler.cpp @@ -28,7 +28,7 @@ #include "nucleus/tile_scheduler/tile_types.h" #include "nucleus/tile_scheduler/utils.h" #include "nucleus/utils/tile_conversion.h" -#include "sherpa/TileHeights.h" +#include "radix/TileHeights.h" #include "unittests/catch2_helpers.h" #include "unittests/test_helpers.h" diff --git a/unittests/nucleus_tile_scheduler_slot_limiter.cpp b/unittests/nucleus_tile_scheduler_slot_limiter.cpp index f9c6f7e4..a8c51eb8 100644 --- a/unittests/nucleus_tile_scheduler_slot_limiter.cpp +++ b/unittests/nucleus_tile_scheduler_slot_limiter.cpp @@ -22,7 +22,7 @@ #include "nucleus/tile_scheduler/SlotLimiter.h" #include "nucleus/tile_scheduler/tile_types.h" -#include "sherpa/tile.h" +#include "radix/tile.h" TEST_CASE("nucleus/tile_scheduler/slot limiter") { diff --git a/unittests/nucleus_tile_scheduler_util.cpp b/unittests/nucleus_tile_scheduler_util.cpp index 9543be72..e3a86a8f 100644 --- a/unittests/nucleus_tile_scheduler_util.cpp +++ b/unittests/nucleus_tile_scheduler_util.cpp @@ -28,7 +28,7 @@ #include "nucleus/camera/PositionStorage.h" #include "nucleus/tile_scheduler/utils.h" #include "nucleus/utils/tile_conversion.h" -#include "sherpa/quad_tree.h" +#include "radix/quad_tree.h" using Catch::Approx; using namespace nucleus::tile_scheduler; diff --git a/unittests/test_Camera.cpp b/unittests/test_Camera.cpp index 19db70fc..a2e8bba3 100644 --- a/unittests/test_Camera.cpp +++ b/unittests/test_Camera.cpp @@ -20,7 +20,7 @@ #include #include "nucleus/camera/Definition.h" -#include "sherpa/geometry.h" +#include "radix/geometry.h" #include "unittests/test_helpers.h" using test_helpers::equals; diff --git a/unittests/test_DrawListGenerator.cpp b/unittests/test_DrawListGenerator.cpp index 81fa5420..54f09528 100644 --- a/unittests/test_DrawListGenerator.cpp +++ b/unittests/test_DrawListGenerator.cpp @@ -24,8 +24,8 @@ #include "nucleus/camera/PositionStorage.h" #include "nucleus/tile_scheduler/DrawListGenerator.h" #include "nucleus/tile_scheduler/utils.h" -#include "sherpa/TileHeights.h" -#include "sherpa/quad_tree.h" +#include "radix/TileHeights.h" +#include "radix/quad_tree.h" TEST_CASE("nucleus/tile_scheduler/DrawListGenerator") { diff --git a/unittests/test_zppbits.cpp b/unittests/test_zppbits.cpp index a3c4732f..fc0059bf 100644 --- a/unittests/test_zppbits.cpp +++ b/unittests/test_zppbits.cpp @@ -22,7 +22,7 @@ #include #include -#include "sherpa/tile.h" +#include "radix/tile.h" namespace { From e9c5c245b4c671901e5141f60acb2571952cd97f Mon Sep 17 00:00:00 2001 From: Adam Celarek <5292991+adam-ce@users.noreply.github.com> Date: Tue, 14 Nov 2023 00:13:56 +0100 Subject: [PATCH 08/10] require cmake >3.24 (which fixes bugs with make available) --- app/CMakeLists.txt | 2 +- gl_engine/CMakeLists.txt | 2 +- nucleus/CMakeLists.txt | 2 +- plain_renderer/CMakeLists.txt | 2 +- unittests/CMakeLists.txt | 2 +- unittests_gl/CMakeLists.txt | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app/CMakeLists.txt b/app/CMakeLists.txt index 777a8ec5..6f48d063 100644 --- a/app/CMakeLists.txt +++ b/app/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.21) +cmake_minimum_required(VERSION 3.24) project(alpine-renderer-app LANGUAGES CXX) qt_add_executable(alpineapp diff --git a/gl_engine/CMakeLists.txt b/gl_engine/CMakeLists.txt index fa24319e..a161fb92 100644 --- a/gl_engine/CMakeLists.txt +++ b/gl_engine/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.21) +cmake_minimum_required(VERSION 3.24) project(alpine-renderer-gl_engine LANGUAGES CXX) # If true the shaders will be loaded from the given ALP_SHADER_NETWORK_URL and can be reloaded diff --git a/nucleus/CMakeLists.txt b/nucleus/CMakeLists.txt index b16176ec..8aba30c9 100644 --- a/nucleus/CMakeLists.txt +++ b/nucleus/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.21) +cmake_minimum_required(VERSION 3.24) project(alpine-renderer-nucleus LANGUAGES CXX) option(ALP_AUTOUPDATE_RADIX "Keeps whack up-to-date with origin/main, but prevents local edits. Change to OFF if you want to edit radix" TRUE) diff --git a/plain_renderer/CMakeLists.txt b/plain_renderer/CMakeLists.txt index 654bb135..0e87d9dc 100644 --- a/plain_renderer/CMakeLists.txt +++ b/plain_renderer/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.21) +cmake_minimum_required(VERSION 3.24) project(alpine-renderer-plain_renderer LANGUAGES CXX) qt_add_executable(plain_renderer diff --git a/unittests/CMakeLists.txt b/unittests/CMakeLists.txt index a530f8a2..85ca4396 100644 --- a/unittests/CMakeLists.txt +++ b/unittests/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.21) +cmake_minimum_required(VERSION 3.24) project(alpine-renderer-unittests_nucleus LANGUAGES CXX) FetchContent_Declare(catch2 diff --git a/unittests_gl/CMakeLists.txt b/unittests_gl/CMakeLists.txt index e0fefbf1..407a3481 100644 --- a/unittests_gl/CMakeLists.txt +++ b/unittests_gl/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.21) +cmake_minimum_required(VERSION 3.24) project(alpine-renderer-unittests_gl_engine LANGUAGES CXX) FetchContent_Declare(catch2 From 1092fe9e98053762d6f532a1ce31d4c22e4c916a Mon Sep 17 00:00:00 2001 From: Adam Celarek <5292991+adam-ce@users.noreply.github.com> Date: Tue, 14 Nov 2023 00:14:46 +0100 Subject: [PATCH 09/10] try to fix ci.yml (newer qt version + qt charts) --- .github/workflows/ci.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b8a284c2..31ad560b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -42,14 +42,15 @@ jobs: release: false - name: Install Qt - uses: jurplel/install-qt-action@v2 + uses: jurplel/install-qt-action@v3 with: - version: '6.5.3' + version: '6.6.0' host: ${{ matrix.host }} target: 'desktop' arch: ${{ matrix.arch }} dir: '${{github.workspace}}/qt' - install-deps: 'true' + install-deps: 'true' + modules: qtcharts, qtpositioning - name: Configure env: @@ -61,5 +62,5 @@ jobs: - name: Test run: | - '${{github.workspace}}'/build/sherpa/unittests_sherpa '${{github.workspace}}'/build/unittests/unittests_nucleus + '${{github.workspace}}'/build/unittests_gl/unittests_gl_engine From 6d98af5b9056128639867c9dc087bd242bce1334 Mon Sep 17 00:00:00 2001 From: Adam Celarek <5292991+adam-ce@users.noreply.github.com> Date: Tue, 14 Nov 2023 00:19:35 +0100 Subject: [PATCH 10/10] try correcting module config --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 31ad560b..8fc18c88 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -50,7 +50,7 @@ jobs: arch: ${{ matrix.arch }} dir: '${{github.workspace}}/qt' install-deps: 'true' - modules: qtcharts, qtpositioning + modules: 'qtcharts qtpositioning' - name: Configure env: