diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b8a284c2..8fc18c88 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 diff --git a/.gitignore b/.gitignore index 02821b4a..e3709844 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /CMakeLists.txt.user +/extern/* 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/CMakeLists.txt b/CMakeLists.txt index a50a8f95..a8f7c011 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) @@ -6,6 +6,9 @@ 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..") if(ALP_ENABLE_TRACK_OBJECT_LIFECYCLE) add_definitions(-DALP_ENABLE_TRACK_OBJECT_LIFECYCLE) @@ -33,6 +36,12 @@ set(CMAKE_AUTOMOC ON) set(CMAKE_AUTORCC ON) set(CMAKE_AUTOUIC ON) +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") set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fno-omit-frame-pointer -fsanitize=address") @@ -58,29 +67,24 @@ 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) -FetchContent_Declare(zppbits GIT_REPOSITORY https://github.com/eyalz800/zpp_bits.git GIT_TAG main) - -FetchContent_MakeAvailable(alpine_height_data alpineapp_fonts fmt zppbits) +FetchContent_MakeAvailable(alpine_height_data alpineapp_fonts) 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 ) @@ -88,12 +92,9 @@ if (ANDROID) include(${android_openssl_SOURCE_DIR}/android_openssl.cmake) endif() -add_library(zppbits INTERFACE) -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/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/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/CMakeLists.txt b/nucleus/CMakeLists.txt index b7aaca35..8aba30c9 100644 --- a/nucleus/CMakeLists.txt +++ b/nucleus/CMakeLists.txt @@ -1,14 +1,54 @@ -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) + include(FetchContent) + +if(ALP_AUTOUPDATE_RADIX) + FetchContent_Declare(radix + GIT_REPOSITORY https://github.com/AlpineMapsOrg/radix.git + GIT_TAG origin/main + SOURCE_DIR ${CMAKE_SOURCE_DIR}/${ALP_EXTERN_DIR}/radix + SOURCE_SUBDIR src + ) + FetchContent_MakeAvailable(radix) +else() + 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}/${ALP_EXTERN_DIR}/radix + ) + FetchContent_MakeAvailable(radix) + else() + add_subdirectory(${CMAKE_SOURCE_DIR}/${ALP_EXTERN_DIR}/radix ${CMAKE_BINARY_DIR}/_deps/radix-build) + endif() +endif() + +message("###################ALP_EXTERN_DIR = ${ALP_EXTERN_DIR}") 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 + 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 ) -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 @@ -59,7 +99,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) 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/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/sherpa b/sherpa deleted file mode 160000 index eaf6c6ce..00000000 --- a/sherpa +++ /dev/null @@ -1 +0,0 @@ -Subproject commit eaf6c6cef4f1b5a79571be6929f9f513a03caf0d diff --git a/unittests/CMakeLists.txt b/unittests/CMakeLists.txt index 4df5e0b0..85ca4396 100644 --- a/unittests/CMakeLists.txt +++ b/unittests/CMakeLists.txt @@ -1,6 +1,14 @@ -cmake_minimum_required(VERSION 3.21) +cmake_minimum_required(VERSION 3.24) 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/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_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__ 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 { diff --git a/unittests_gl/CMakeLists.txt b/unittests_gl/CMakeLists.txt index 0160cc6e..407a3481 100644 --- a/unittests_gl/CMakeLists.txt +++ b/unittests_gl/CMakeLists.txt @@ -1,6 +1,14 @@ -cmake_minimum_required(VERSION 3.21) +cmake_minimum_required(VERSION 3.24) 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