diff --git a/.github/actions/f3d-superbuild/action.yml b/.github/actions/f3d-superbuild/action.yml index 6a58f6b8..65fc8afe 100644 --- a/.github/actions/f3d-superbuild/action.yml +++ b/.github/actions/f3d-superbuild/action.yml @@ -73,6 +73,7 @@ runs: -DBUILD_SHARED_LIBS_draco=OFF -DBUILD_SHARED_LIBS_openexr=OFF -DBUILD_SHARED_LIBS_imath=OFF + -DBUILD_SHARED_LIBS_imgui=OFF -DBUILD_SHARED_LIBS_occt=OFF -DBUILD_SHARED_LIBS_openusd=ON -DBUILD_SHARED_LIBS_openvdb=OFF diff --git a/.github/actions/wheels/action.yml b/.github/actions/wheels/action.yml index 61be00f9..dcf4ad28 100644 --- a/.github/actions/wheels/action.yml +++ b/.github/actions/wheels/action.yml @@ -77,7 +77,7 @@ runs: shell: bash run: | echo "CMAKE_PREFIX_PATH=../fsbb/install" >> $GITHUB_ENV - echo "SKBUILD_CMAKE_ARGS=-DF3D_DEPENDENCIES_DIR=${{ env.ESCAPED_WS }}/fsbb/install/bin;-DF3D_PLUGIN_BUILD_ALEMBIC=ON;-DF3D_PLUGIN_BUILD_ASSIMP=ON;-DF3D_PLUGIN_BUILD_DRACO=ON;-DF3D_PLUGIN_BUILD_OCCT=ON;-DF3D_PLUGIN_OCCT_COLORING_SUPPORT=ON;-DF3D_MODULE_EXR=ON;-DF3D_WINDOWS_GUI=OFF;-DF3D_MACOS_BUNDLE=OFF" >> $GITHUB_ENV + echo "SKBUILD_CMAKE_ARGS=-DF3D_DEPENDENCIES_DIR=${{ env.ESCAPED_WS }}/fsbb/install/bin;-DF3D_PLUGIN_BUILD_ALEMBIC=ON;-DF3D_PLUGIN_BUILD_ASSIMP=ON;-DF3D_PLUGIN_BUILD_DRACO=ON;-DF3D_PLUGIN_BUILD_OCCT=ON;-DF3D_PLUGIN_OCCT_COLORING_SUPPORT=ON;-DF3D_MODULE_EXR=ON;-DF3D_MODULE_UI=ON;-DF3D_WINDOWS_GUI=OFF;-DF3D_MACOS_BUNDLE=OFF" >> $GITHUB_ENV - name: Build superbuild and wheels if: | diff --git a/.github/actions/wheels/build_f3d_superbuild.sh b/.github/actions/wheels/build_f3d_superbuild.sh index ac4509be..c66ccdab 100644 --- a/.github/actions/wheels/build_f3d_superbuild.sh +++ b/.github/actions/wheels/build_f3d_superbuild.sh @@ -7,6 +7,7 @@ cmake -S ./source -B ./fsbb \ -DENABLE_alembic=ON \ -DENABLE_assimp=ON \ -DENABLE_draco=ON \ + -DENABLE_imgui=ON \ -DENABLE_occt=ON \ -DENABLE_openexr=ON \ -DENABLE_openusd=OFF \ diff --git a/CMakeLists.txt b/CMakeLists.txt index 93760ee6..7e502ae2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -40,6 +40,7 @@ function (superbuild_find_projects var) f3d hdf5 imath + imgui ispc lz4 netcdf @@ -136,6 +137,7 @@ set(_superbuild_default_alembic ON) set(_superbuild_default_assimp ON) set(_superbuild_default_draco ON) set(_superbuild_default_exodus ON) +set(_superbuild_default_imgui ON) set(_superbuild_default_occt ON) set(_superbuild_default_openvdb ON) set(_superbuild_default_openexr ON) diff --git a/README.md b/README.md index 9e938e78..4cbbec62 100644 --- a/README.md +++ b/README.md @@ -65,8 +65,9 @@ This repository also generate a nightly release of F3D. - `ENABLE_alembic`: ON by defaut, build and package alembic and the associated F3D plugin - `ENABLE_assimp`: ON by defaut, build and package assimp and the associated F3D plugin - `ENABLE_draco`: ON by defaut, build and package draco and the associated F3D plugin + - `ENABLE_imgui`: ON by default, build and package imgui and the associated F3D module - `ENABLE_occt`: ON by defaut, build and package occt and the associated F3D plugin - - `ENABLE_openexr`: ON by default, build and package OpenEXR and the associated VTK module + - `ENABLE_openexr`: ON by default, build and package OpenEXR and the associated F3D module - `ENABLE_ospray`: ON by defaut, build and package ospray and the associated VTK module - `ENABLE_tbb`: ON by default, build and package TBB to enable multi-threading - `ENABLE_pybind11`: OFF by defaut, build pybind11 and F3D python bindings, not packageable diff --git a/projects/f3d.cmake b/projects/f3d.cmake index 071171d0..8a288960 100644 --- a/projects/f3d.cmake +++ b/projects/f3d.cmake @@ -20,7 +20,7 @@ superbuild_add_project(f3d LICENSE.md doc/THIRD_PARTY_LICENSES.md DEPENDS vtk cxx17 - DEPENDS_OPTIONAL pybind11 alembic assimp draco occt openexr openusd openvdb + DEPENDS_OPTIONAL pybind11 alembic assimp draco imgui occt openexr openusd openvdb CMAKE_ARGS -DCMAKE_INSTALL_NAME_DIR:PATH=/lib -DF3D_LINUX_GENERATE_MAN:BOOL=${f3d_build_for_linux} @@ -28,6 +28,7 @@ superbuild_add_project(f3d -DF3D_MACOS_BUNDLE:BOOL=${f3d_build_for_macos} -DF3D_MODULE_EXR:BOOL=${openexr_enabled} -DF3D_MODULE_RAYTRACING:BOOL=${ospray_enabled} + -DF3D_MODULE_UI:BOOL=${imgui_enabled} -DF3D_PLUGINS_STATIC_BUILD:BOOL=ON -DF3D_PLUGIN_BUILD_ALEMBIC:BOOL=${alembic_enabled} -DF3D_PLUGIN_BUILD_ASSIMP:BOOL=${assimp_enabled} diff --git a/projects/imgui.cmake b/projects/imgui.cmake new file mode 100644 index 00000000..85a900c4 --- /dev/null +++ b/projects/imgui.cmake @@ -0,0 +1,7 @@ +superbuild_add_project(imgui + BUILD_SHARED_LIBS_INDEPENDENT + LICENSE_FILES + LICENSE.txt +) + +superbuild_apply_patch(imgui cmake-build "Add CMake build system") diff --git a/projects/patches/imgui-cmake-build.patch b/projects/patches/imgui-cmake-build.patch new file mode 100644 index 00000000..44c794c4 --- /dev/null +++ b/projects/patches/imgui-cmake-build.patch @@ -0,0 +1,109 @@ +commit cab05d14c0ef97e286971f388df2f656642e6835 +Author: Michael Migliore +Date: Thu Nov 28 09:20:46 2024 +0100 + + Add CMake build system + +diff --git a/CMakeLists.txt b/CMakeLists.txt +new file mode 100644 +index 00000000..dbb79cd0 +--- /dev/null ++++ b/CMakeLists.txt +@@ -0,0 +1,71 @@ ++cmake_minimum_required(VERSION 3.16) ++project(imgui CXX) ++ ++add_library(${PROJECT_NAME} "") ++ ++include(GenerateExportHeader) ++generate_export_header(${PROJECT_NAME} ++ EXPORT_FILE_NAME imgui_export.h ++ EXPORT_MACRO_NAME IMGUI_API) ++ ++target_include_directories( ++ ${PROJECT_NAME} ++ PUBLIC ++ $ ++ $ ++ $ ++) ++ ++target_sources( ++ ${PROJECT_NAME} ++ PRIVATE ++ ${CMAKE_CURRENT_SOURCE_DIR}/imgui.cpp ++ ${CMAKE_CURRENT_SOURCE_DIR}/imgui_draw.cpp ++ ${CMAKE_CURRENT_SOURCE_DIR}/imgui_tables.cpp ++ ${CMAKE_CURRENT_SOURCE_DIR}/imgui_widgets.cpp ++) ++ ++target_compile_definitions( ++ ${PROJECT_NAME} ++ PRIVATE ++ IMGUI_DISABLE_DEMO_WINDOWS ++ IMGUI_DISABLE_DEBUG_TOOLS ++) ++ ++set_target_properties( ++ ${PROJECT_NAME} ++ PROPERTIES ++ CXX_STANDARD 11 ++ POSITION_INDEPENDENT_CODE ON ++) ++ ++install( ++ TARGETS ${PROJECT_NAME} ++ EXPORT ${PROJECT_NAME}_target ++ ARCHIVE DESTINATION lib ++ LIBRARY DESTINATION lib ++ RUNTIME DESTINATION bin ++) ++ ++install(FILES ++ ${CMAKE_CURRENT_BINARY_DIR}/imgui_export.h ++ ${CMAKE_CURRENT_SOURCE_DIR}/imgui.h ++ ${CMAKE_CURRENT_SOURCE_DIR}/imconfig.h ++ ${CMAKE_CURRENT_SOURCE_DIR}/imgui_internal.h ++ ${CMAKE_CURRENT_SOURCE_DIR}/imstb_textedit.h ++ ${CMAKE_CURRENT_SOURCE_DIR}/imstb_rectpack.h ++ ${CMAKE_CURRENT_SOURCE_DIR}/imstb_truetype.h ++ DESTINATION include ++) ++ ++include(CMakePackageConfigHelpers) ++configure_package_config_file(imgui-config.cmake.in imgui-config.cmake INSTALL_DESTINATION share/imgui) ++ ++install(FILES ${CMAKE_CURRENT_BINARY_DIR}/imgui-config.cmake DESTINATION share/imgui) ++ ++install( ++ EXPORT ${PROJECT_NAME}_target ++ NAMESPACE ${PROJECT_NAME}:: ++ FILE ${PROJECT_NAME}-targets.cmake ++ DESTINATION share/${PROJECT_NAME} ++) +diff --git a/imgui-config.cmake.in b/imgui-config.cmake.in +new file mode 100644 +index 00000000..b9e55800 +--- /dev/null ++++ b/imgui-config.cmake.in +@@ -0,0 +1,7 @@ ++cmake_policy(SET CMP0012 NEW) ++ ++@PACKAGE_INIT@ ++ ++include(CMakeFindDependencyMacro) ++ ++include("${CMAKE_CURRENT_LIST_DIR}/imgui-targets.cmake") +diff --git a/imgui.h b/imgui.h +index d6286592..c91cb811 100644 +--- a/imgui.h ++++ b/imgui.h +@@ -65,6 +65,8 @@ Index of this file: + + #ifndef IMGUI_DISABLE + ++#include "imgui_export.h" ++ + //----------------------------------------------------------------------------- + // [SECTION] Header mess + //----------------------------------------------------------------------------- diff --git a/testing/baselines/TestAlembic.png b/testing/baselines/TestAlembic.png index 4654467d..8ed23e3a 100644 --- a/testing/baselines/TestAlembic.png +++ b/testing/baselines/TestAlembic.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a2ee106808bd9769f615110a31c16f469f3133da9a6d8e2e77719b1299f9fb18 -size 55074 +oid sha256:3d616c077fa6a071b67efbc31eaf24fb8662139f06a6959bf82ec83906d6b4bf +size 53965 diff --git a/testing/baselines/TestAssimp.png b/testing/baselines/TestAssimp.png index c830d2ad..a3ad47d3 100644 --- a/testing/baselines/TestAssimp.png +++ b/testing/baselines/TestAssimp.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:10d41212e6eca161b3a287d9929530eee12b94942288c88c362a103dd62b718e -size 52175 +oid sha256:1840d23715199d0c4eda0af62b9c75b4d780a9525330159e9789db3111683a34 +size 50645 diff --git a/testing/baselines/TestDraco.png b/testing/baselines/TestDraco.png index bdb138ba..94057c26 100644 --- a/testing/baselines/TestDraco.png +++ b/testing/baselines/TestDraco.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:67a1e6b7a63eca512e67134567ddd77f7982b9b5147d076fb5b726cb2a30086e -size 72079 +oid sha256:c055ba7c8d024c1f7278e0748fabb96edb73c2f8ead2d8d97cb0d611d58c29b7 +size 70528 diff --git a/testing/baselines/TestOCCT.png b/testing/baselines/TestOCCT.png index 1d35c472..07f5444c 100644 --- a/testing/baselines/TestOCCT.png +++ b/testing/baselines/TestOCCT.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:fa203e730bf3be58d691aa54c9f98bd874b27434008cff58ad605a20051a7ab6 -size 41550 +oid sha256:19c90f8de671198268ed964c88daad5e951a2ba6a305f5f48998ec97bac0b499 +size 39752 diff --git a/testing/baselines/TestOCCTColoring.png b/testing/baselines/TestOCCTColoring.png index dbb59366..6c1ef8b2 100644 --- a/testing/baselines/TestOCCTColoring.png +++ b/testing/baselines/TestOCCTColoring.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:01a2660e328b376950a8a09dc19e4509ff1976169ce6fd8fe23cfda5575743b8 -size 41338 +oid sha256:ce1f5eafcf47eb72fc68a1378c7acdfdd00e4a6a2b8d5962c7df289f2a781fc3 +size 39680 diff --git a/testing/baselines/TestOSPRay.png b/testing/baselines/TestOSPRay.png index c0b30cca..b7ca15f1 100644 --- a/testing/baselines/TestOSPRay.png +++ b/testing/baselines/TestOSPRay.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b065ad6735669fcecdb23f9d4a00e80a1d237432f98e33c8cf16c969d30e5c74 -size 30081 +oid sha256:128bb2f41892ed4f2cd1e1feebc6eb19befdc3311fee061df479ba54478316f2 +size 28362 diff --git a/testing/baselines/TestRenderingGLX.png b/testing/baselines/TestRenderingGLX.png index 9251c7d8..6a7f9bc9 100644 --- a/testing/baselines/TestRenderingGLX.png +++ b/testing/baselines/TestRenderingGLX.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:dbbf3482f3568db0cdba33d2cca8cd075abf7f435d4c05191e5c28791a67a924 -size 66099 +oid sha256:bfb5c9bc60fc9a731306efa28c98ed007b4a71618e24923470419639fe5277c8 +size 64219 diff --git a/testing/baselines/TestRenderingHeadlessEGL.png b/testing/baselines/TestRenderingHeadlessEGL.png index 702e461e..9238b10e 100644 --- a/testing/baselines/TestRenderingHeadlessEGL.png +++ b/testing/baselines/TestRenderingHeadlessEGL.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e4b3c44487f830362802765208a4993c784d5025b3f744b3c2a81e9ca0be7495 -size 48627 +oid sha256:4f140b6d7a81e95e0067289277b3beb8309d695d723be6a7e0dde95f6312a312 +size 46911 diff --git a/testing/baselines/TestRenderingHeadlessOSMESA.png b/testing/baselines/TestRenderingHeadlessOSMESA.png index 9251c7d8..6a7f9bc9 100644 --- a/testing/baselines/TestRenderingHeadlessOSMESA.png +++ b/testing/baselines/TestRenderingHeadlessOSMESA.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:dbbf3482f3568db0cdba33d2cca8cd075abf7f435d4c05191e5c28791a67a924 -size 66099 +oid sha256:bfb5c9bc60fc9a731306efa28c98ed007b4a71618e24923470419639fe5277c8 +size 64219 diff --git a/testing/baselines/TestRenderingWGL.png b/testing/baselines/TestRenderingWGL.png index 9251c7d8..a1ad7315 100644 --- a/testing/baselines/TestRenderingWGL.png +++ b/testing/baselines/TestRenderingWGL.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:dbbf3482f3568db0cdba33d2cca8cd075abf7f435d4c05191e5c28791a67a924 -size 66099 +oid sha256:43e62fb4294aa4af608e6ededd590f978e1096c89bd4742e7886cc05d03cb8bf +size 64335 diff --git a/testing/baselines/TestSimple.png b/testing/baselines/TestSimple.png index c281aa1e..3b8cf575 100644 --- a/testing/baselines/TestSimple.png +++ b/testing/baselines/TestSimple.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:df6157c860a25c96902a84b80bf22a7ed335813ec125b578b986bd44fcf56a1a -size 48459 +oid sha256:b35d3ed4dd14159f5ff22aa38e4484b209c0d16becd976c78bc4fe26e11ef11b +size 47329 diff --git a/testing/baselines/TestSimpleColor.png b/testing/baselines/TestSimpleColor.png index 25859573..2d214b6d 100644 --- a/testing/baselines/TestSimpleColor.png +++ b/testing/baselines/TestSimpleColor.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f8f51c452b40b11b7f569c02669ff65fc3ab18dbc5b6321ab26cf6f00dc360f4 -size 65177 +oid sha256:f03d49b8de0bec2bf6ee34ac328eaea196a564ce4f15df3248f8467529e012e1 +size 63180 diff --git a/testing/baselines/TestSplat.png b/testing/baselines/TestSplat.png index d53ac08c..34cd067a 100644 --- a/testing/baselines/TestSplat.png +++ b/testing/baselines/TestSplat.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:261a02e97338c0fe5052dc1365e0711c3bd1d1081611fb006c0f8fc82c5a0d18 -size 117523 +oid sha256:51bb1e30724e008c02f52059357a3e9860f121cbab95f03a026dc117a0cac019 +size 116859 diff --git a/testing/baselines/TestUSD.png b/testing/baselines/TestUSD.png index 9b827bcb..f5d77bda 100644 --- a/testing/baselines/TestUSD.png +++ b/testing/baselines/TestUSD.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ab74815eaeee8c5c6320c5add139127f9906f0ef8a1fb31ad7d782bcd60ea4bd -size 48028 +oid sha256:f3b36c9521bcfcaa58c620608851183d0349419d2290e0a345538362c90318c0 +size 46455 diff --git a/testing/baselines/TestVDB.png b/testing/baselines/TestVDB.png index 565f4cb9..747c03a3 100644 --- a/testing/baselines/TestVDB.png +++ b/testing/baselines/TestVDB.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e9b52b5ba44600b8db36164ff75f8a5808022e05f866bad9746ae5d1cceb4604 -size 54933 +oid sha256:ab3305c3e22fb108f5588a50d7b34a96ca6355b7fcac90302cf3ff5c3bbab268 +size 53008 diff --git a/versions.cmake b/versions.cmake index 6c82eb6d..7cc68922 100644 --- a/versions.cmake +++ b/versions.cmake @@ -28,6 +28,11 @@ superbuild_set_revision(openvdb DOWNLOAD_NAME openvdb-v11.0.0.tar.gz URL_MD5 025f4fc4db58419341a4991f1a16174a) +superbuild_set_revision(imgui + URL "https://github.com/ocornut/imgui/archive/refs/tags/v1.91.5.tar.gz" + DOWNLOAD_NAME imgui-v1.91.5.tar.gz + URL_MD5 264b2c35eaa1ab1595eb9afe080b4e1a) + superbuild_set_selectable_source(vtk SELECT 9.3.1 DEFAULT URL "https://www.vtk.org/files/release/9.3/VTK-9.3.1.tar.gz"