[vsgimgui] Update to 0.7.0 (#47864)

This commit is contained in:
Kai Pastor 2025-10-21 20:09:36 +02:00 committed by GitHub
parent 6617c815a4
commit 6353ece09f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 54 additions and 88 deletions

View File

@ -1,47 +1,33 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a9e6265..96a2ecb 100644
index a1c83a3..bba4c19 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -22,34 +22,13 @@ if (VULKAN_SDK)
@@ -22,11 +22,14 @@ if (VULKAN_SDK)
set(ENV{VULKAN_SDK} ${VULKAN_SDK})
endif()
-find_package(vsg 1.0.5)
+find_package(vsg REQUIRED)
+find_package(imgui REQUIRED)
+find_package(implot REQUIRED)
-find_package(vsg 1.1.10)
+find_package(vsg CONFIG REQUIRED)
+find_package(imgui CONFIG REQUIRED)
+find_package(implot CONFIG REQUIRED)
vsg_setup_dir_vars()
vsg_setup_build_vars()
-if ( (NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/src/imgui/imgui.h) OR
- (NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/src/implot/implot.h) )
- find_package(Git QUIET)
-
- execute_process(COMMAND ${GIT_EXECUTABLE} submodule update --init --recursive
- WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
- RESULT_VARIABLE GIT_SUBMOD_RESULT)
-
- if(NOT GIT_SUBMOD_RESULT EQUAL "0")
- message(FATAL_ERROR "git submodule update --init --recursive failed with ${GIT_SUBMOD_RESULT}, please checkout submodules")
- endif()
-endif()
-
-vsg_copy_imgui_headers(
- FILES
- ${VSGIMGUI_SOURCE_DIR}/src/imgui/imgui.h
- ${VSGIMGUI_SOURCE_DIR}/src/imgui/imconfig.h
- ${VSGIMGUI_SOURCE_DIR}/src/imgui/imgui_internal.h
- ${VSGIMGUI_SOURCE_DIR}/src/imgui/imstb_textedit.h
- ${VSGIMGUI_SOURCE_DIR}/src/imgui//misc/cpp/imgui_stdlib.h
- ${VSGIMGUI_SOURCE_DIR}/src/implot/implot.h
- ${VSGIMGUI_SOURCE_DIR}/src/implot/implot_internal.h
-)
+if(0)
if ( (NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/src/imgui/imgui.h) OR
(NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/src/implot/implot.h) )
find_package(Git QUIET)
@@ -50,6 +53,7 @@ vsg_copy_imgui_headers(
${VSGIMGUI_SOURCE_DIR}/src/implot/implot.h
${VSGIMGUI_SOURCE_DIR}/src/implot/implot_internal.h
)
+endif(0)
vsg_add_target_clang_format(
FILES
diff --git a/include/vsgImGui/RenderImGui.h b/include/vsgImGui/RenderImGui.h
index b4210d2..33198e4 100644
index 9eddd36..656d0b1 100644
--- a/include/vsgImGui/RenderImGui.h
+++ b/include/vsgImGui/RenderImGui.h
@@ -31,7 +31,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@ -54,51 +40,20 @@ index b4210d2..33198e4 100644
namespace vsgImGui
{
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 41d749d..919159e 100644
index 41d749d..b895225 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -6,40 +6,21 @@ set(EXTRA_INCLUDES)
SET(HEADER_PATH ${VSGIMGUI_SOURCE_DIR}/include/vsgImGui)
set(HEADERS
- ${HEADER_PATH}/imgui.h
${HEADER_PATH}/SendEventsToImGui.h
${HEADER_PATH}/RenderImGui.h
${HEADER_PATH}/Texture.h
- imgui/imconfig.h
- imgui/imgui_internal.h
- imgui/imstb_rectpack.h
- imgui/imstb_textedit.h
- imgui/imstb_truetype.h
- imgui/misc/cpp/imgui_stdlib.h
- implot/implot.h
- implot/implot_internal.h
)
set(SOURCES
vsgImGui/RenderImGui.cpp
vsgImGui/SendEventsToImGui.cpp
vsgImGui/Texture.cpp
- imgui/imgui.cpp
- imgui/imgui_draw.cpp
- imgui/imgui_tables.cpp
- imgui/imgui_widgets.cpp
- imgui/backends/imgui_impl_vulkan.cpp
- imgui/misc/cpp/imgui_stdlib.cpp
- implot/implot.cpp
- implot/implot_items.cpp
@@ -34,6 +34,9 @@ set(SOURCES
implot/implot_items.cpp
)
+list(FILTER HEADERS EXCLUDE REGEX "^imgui/|^implot/|/imgui.h\$")
+list(FILTER SOURCES EXCLUDE REGEX "^imgui/|^implot/")
+
OPTION(SHOW_DEMO_WINDOW "Toggle the build of the ImGui::ShowDemoWindow(bool*) and ImPlot::ShadowDemoWindow(bool*)" ON)
if (SHOW_DEMO_WINDOW)
set(SOURCES ${SOURCES}
- imgui/imgui_demo.cpp
- implot/implot_demo.cpp
)
else()
set(SOURCES ${SOURCES}
@@ -73,6 +54,8 @@ target_include_directories(vsgImGui PUBLIC
@@ -73,6 +76,8 @@ target_include_directories(vsgImGui PUBLIC
target_link_libraries(vsgImGui
PUBLIC
vsg::vsg
@ -108,7 +63,7 @@ index 41d749d..919159e 100644
${EXTRA_LIBRARIES}
)
diff --git a/src/vsgImGui/RenderImGui.cpp b/src/vsgImGui/RenderImGui.cpp
index 5d7cf06..dac2227 100644
index 31780eb..fd70a6f 100644
--- a/src/vsgImGui/RenderImGui.cpp
+++ b/src/vsgImGui/RenderImGui.cpp
@@ -22,9 +22,9 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@ -122,9 +77,9 @@ index 5d7cf06..dac2227 100644
+#include <imgui_impl_vulkan.h>
#include <vsg/io/Logger.h>
#include <vsg/vk/State.h>
#include <vsg/maths/color.h>
diff --git a/src/vsgImGui/SendEventsToImGui.cpp b/src/vsgImGui/SendEventsToImGui.cpp
index 4e83e4c..b1f4d83 100644
index 11de226..ef784fc 100644
--- a/src/vsgImGui/SendEventsToImGui.cpp
+++ b/src/vsgImGui/SendEventsToImGui.cpp
@@ -22,7 +22,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@ -137,14 +92,16 @@ index 4e83e4c..b1f4d83 100644
#include <vsg/ui/KeyEvent.h>
#include <vsg/ui/PointerEvent.h>
diff --git a/src/vsgImGuiConfig.cmake.in b/src/vsgImGuiConfig.cmake.in
index e2c14f2..5cf8bd9 100644
index e2c14f2..e0dcc98 100644
--- a/src/vsgImGuiConfig.cmake.in
+++ b/src/vsgImGuiConfig.cmake.in
@@ -2,5 +2,7 @@ include(CMakeFindDependencyMacro)
@@ -1,6 +1,8 @@
include(CMakeFindDependencyMacro)
find_dependency(Vulkan)
find_dependency(vsg)
+find_dependency(imgui)
+find_dependency(implot)
-find_dependency(vsg)
+find_dependency(vsg CONFIG)
+find_dependency(imgui CONFIG)
+find_dependency(implot CONFIG)
include("${CMAKE_CURRENT_LIST_DIR}/vsgImGuiTargets.cmake")

View File

@ -2,20 +2,24 @@ vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO vsg-dev/vsgImGui
REF "v${VERSION}"
SHA512 f27ef25edb95c2129553732054080582a6990b6d84ae6f3ff2007489f02cfcb6ce3f728eb56b584315f5e9835daf74d104962b07b35463ba655bf7aa5c99489c
SHA512 1d3e673a718769bb6ea6de723a398712220e9a91fa4ca21bce449613e18cd9ccd0030669db8bbf86c468fa26f7a872acfef194989ccc453e7d60959f697fd000
HEAD_REF master
PATCHES
devendor.patch
remove-manual-font-creation.patch
)
file(REMOVE "${SOURCE_PATH}/include/vsgImGui/imgui.h")
vcpkg_cmake_configure(SOURCE_PATH "${SOURCE_PATH}")
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
-DSHOW_DEMO_WINDOW=OFF
)
vcpkg_cmake_install()
vcpkg_cmake_config_fixup(PACKAGE_NAME "vsgImGui" CONFIG_PATH "lib/cmake/vsgImGui")
vcpkg_copy_pdbs()
vcpkg_cmake_config_fixup(CONFIG_PATH "lib/cmake/vsgImGui")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE.md")

View File

@ -1,5 +1,5 @@
diff --git a/include/vsgImGui/RenderImGui.h b/include/vsgImGui/RenderImGui.h
index e8186c6..8059d75 100644
index 656d0b1..73c661d 100644
--- a/include/vsgImGui/RenderImGui.h
+++ b/include/vsgImGui/RenderImGui.h
@@ -86,7 +86,6 @@ namespace vsgImGui
@ -9,12 +9,12 @@ index e8186c6..8059d75 100644
- void _uploadFonts();
};
} // namespace vsgImGui
// temporary workaround for Dear ImGui's nonexistent sRGB awareness
diff --git a/src/vsgImGui/RenderImGui.cpp b/src/vsgImGui/RenderImGui.cpp
index 306030b..d662531 100644
index fd70a6f..c8b6e7b 100644
--- a/src/vsgImGui/RenderImGui.cpp
+++ b/src/vsgImGui/RenderImGui.cpp
@@ -60,7 +60,6 @@ namespace vsgImGui
@@ -71,7 +71,6 @@ namespace vsgImGui
RenderImGui::RenderImGui(const vsg::ref_ptr<vsg::Window>& window, bool useClearAttachments)
{
_init(window, useClearAttachments);
@ -22,7 +22,7 @@ index 306030b..d662531 100644
}
RenderImGui::RenderImGui(vsg::ref_ptr<vsg::Device> device, uint32_t queueFamily,
@@ -69,7 +68,6 @@ RenderImGui::RenderImGui(vsg::ref_ptr<vsg::Device> device, uint32_t queueFamily,
@@ -80,7 +79,6 @@ RenderImGui::RenderImGui(vsg::ref_ptr<vsg::Device> device, uint32_t queueFamily,
VkExtent2D imageSize, bool useClearAttachments)
{
_init(device, queueFamily, renderPass, minImageCount, imageCount, imageSize, useClearAttachments);
@ -30,7 +30,7 @@ index 306030b..d662531 100644
}
RenderImGui::~RenderImGui()
@@ -184,11 +182,6 @@ void RenderImGui::_init(
@@ -217,11 +215,6 @@ void RenderImGui::_init(
}
}

View File

@ -1,6 +1,6 @@
{
"name": "vsgimgui",
"version": "0.3.0",
"version": "0.7.0",
"description": "Library that integrates VulkanSceneGraph with Dear ImGui & ImPlot.",
"homepage": "https://github.com/vsg-dev/vsgImGui",
"license": "MIT",

View File

@ -10233,7 +10233,7 @@
"port-version": 1
},
"vsgimgui": {
"baseline": "0.3.0",
"baseline": "0.7.0",
"port-version": 0
},
"vsgxchange": {

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "9200de3d696659de20b6a8fd62f393baa078fcbc",
"version": "0.7.0",
"port-version": 0
},
{
"git-tree": "f6ad48a2b4865f57e57b4542c46c9223f3136a3a",
"version": "0.3.0",