[imgui] update to 1.92.7 (#50931)

This commit is contained in:
Tom Conder 2026-04-04 00:56:39 -05:00 committed by GitHub
parent 2bf97de0a8
commit 4623e3dce1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
12 changed files with 83 additions and 15 deletions

View File

@ -14,7 +14,7 @@ index 5c46cc4..18f6dad 100644
# if IMGUI_VERSION_NUM < 18955
inline ImVec2 operator-(const ImVec2& lhs);
diff --git a/imgui_extra_math.inl b/imgui_extra_math.inl
index 8b1b071..acc1254 100644
index 8b1b071..a12708a 100644
--- a/imgui_extra_math.inl
+++ b/imgui_extra_math.inl
@@ -19,6 +19,7 @@
@ -25,11 +25,18 @@ index 8b1b071..acc1254 100644
inline bool operator==(const ImVec2& lhs, const ImVec2& rhs)
{
return lhs.x == rhs.x && lhs.y == rhs.y;
@@ -28,6 +29,7 @@ inline bool operator!=(const ImVec2& lhs, const ImVec2& rhs)
@@ -28,11 +29,14 @@ inline bool operator!=(const ImVec2& lhs, const ImVec2& rhs)
{
return lhs.x != rhs.x || lhs.y != rhs.y;
}
+#endif
+# if IMGUI_VERSION_NUM < 19270
inline ImVec2 operator*(const float lhs, const ImVec2& rhs)
{
return ImVec2(lhs * rhs.x, lhs * rhs.y);
}
+#endif
# if IMGUI_VERSION_NUM < 18955
inline ImVec2 operator-(const ImVec2& lhs)

View File

@ -1,7 +1,7 @@
{
"name": "imgui-node-editor",
"version": "0.9.3",
"port-version": 3,
"port-version": 4,
"description": "Node Editor built using Dear ImGui",
"homepage": "https://github.com/thedmd/imgui-node-editor",
"license": "MIT",

View File

@ -5,7 +5,7 @@ if ("docking-experimental" IN_LIST FEATURES)
OUT_SOURCE_PATH SOURCE_PATH
REPO ocornut/imgui
REF "v${VERSION}-docking"
SHA512 14cf795a95deb8f3ba45c2eed3c26584b713c0cf17e01939a372c033c344ba78ddfa4d0d63619243b639779aa1eacf452771d1b6a1d9b80d13f8cc4d0b9d8e6d
SHA512 5c1064765dba5ab22bc34a0d4d7f00c8184621668366541760512096ca3e63cf4e345a8940415eb4a0cedc96ac336375a3ccaf14b38ff4dc84dc7d677360a74c
HEAD_REF docking
)
else()
@ -13,7 +13,7 @@ else()
OUT_SOURCE_PATH SOURCE_PATH
REPO ocornut/imgui
REF "v${VERSION}"
SHA512 1742eaa4811fc63f4ed3804ecd6970cbc0a960c85014903e302ab082ccf7ff7488d534bd4cb7a6d7c2a71824cb80d6c9923ea5a4951190941121cf1b05e3df9d
SHA512 4f9ea15689b6ad02286744c8917ac6b6f3b1c47c86691f357f01b8ecb84130eaab90cb1931a09d457cfd0c965c95e8fe66418350e839561af7818973f82180a1
HEAD_REF master
)
endif()
@ -65,7 +65,7 @@ if ("test-engine" IN_LIST FEATURES)
OUT_SOURCE_PATH TEST_ENGINE_SOURCE_PATH
REPO ocornut/imgui_test_engine
REF "v${VERSION}"
SHA512 f125ed5e8345fa9c7e9761ad738c68e2b51bd7cfe338dbb1bb4235d65f9430dc1555beb1f12409941ad5f1c8580409b11bd52db3b159a3d08a61000507900104
SHA512 d2ea0c1c5b27f01be667c4665948e7db36c2a3b15482421b955d1b04ee30700b6a0c97629b1c92e4897285d9fdc0544cadaa0e12c3fc73e3cab5ac93433f4f5b
HEAD_REF master
)

View File

@ -1,6 +1,6 @@
{
"name": "imgui",
"version": "1.92.6",
"version": "1.92.7",
"description": "Bloat-free Immediate Mode Graphical User interface for C++ with minimal dependencies.",
"homepage": "https://github.com/ocornut/imgui",
"license": "MIT",

View File

@ -0,0 +1,48 @@
diff --git a/include/igl/opengl/glfw/imgui/ImGuiHelpers.h b/include/igl/opengl/glfw/imgui/ImGuiHelpers.h
index f35f097..8dcb3af 100644
--- a/include/igl/opengl/glfw/imgui/ImGuiHelpers.h
+++ b/include/igl/opengl/glfw/imgui/ImGuiHelpers.h
@@ -25,28 +25,25 @@
namespace ImGui
{
-static auto vector_getter = [](void* vec, int idx, const char** out_text)
+static auto vector_getter = [](void* vec, int idx) -> const char*
{
auto& vector = *static_cast<std::vector<std::string>*>(vec);
- if (idx < 0 || idx >= static_cast<int>(vector.size())) { return false; }
- *out_text = vector.at(idx).c_str();
- return true;
+ if (idx < 0 || idx >= static_cast<int>(vector.size())) { return nullptr; }
+ return vector.at(idx).c_str();
};
inline bool Combo(const char* label, int* idx, std::vector<std::string>& values)
{
if (values.empty()) { return false; }
return Combo(label, idx, vector_getter,
- static_cast<void*>(&values), values.size());
+ static_cast<void*>(&values), static_cast<int>(values.size()));
}
inline bool Combo(const char* label, int* idx, std::function<const char *(int)> getter, int items_count)
{
- auto func = [](void* data, int i, const char** out_text) {
+ auto func = [](void* data, int i) -> const char* {
auto &getter = *reinterpret_cast<std::function<const char *(int)> *>(data);
- const char *s = getter(i);
- if (s) { *out_text = s; return true; }
- else { return false; }
+ return getter(i);
};
return Combo(label, idx, func, reinterpret_cast<void *>(&getter), items_count);
}
@@ -55,7 +52,7 @@ inline bool ListBox(const char* label, int* idx, std::vector<std::string>& value
{
if (values.empty()) { return false; }
return ListBox(label, idx, vector_getter,
- static_cast<void*>(&values), values.size());
+ static_cast<void*>(&values), static_cast<int>(values.size()));
}
inline bool InputText(const char* label, std::string &str, ImGuiInputTextFlags flags = 0, ImGuiInputTextCallback callback = NULL, void* user_data = NULL)

View File

@ -24,6 +24,7 @@ vcpkg_from_github(
imgui-impl.diff
install-extra-targets.patch
instantiations.diff # Fix size_t and ptrdiff_t issues in 32 bit builds (arm32, x86)
fix-imgui-combo-getter.patch # imgui 1.92.7 changed Combo/ListBox getter callback signature
)
file(REMOVE_RECURSE "${SOURCE_PATH}/cmake/recipes")

View File

@ -1,7 +1,7 @@
{
"name": "libigl",
"version": "2.6.0",
"port-version": 1,
"port-version": 2,
"description": "libigl is a simple C++ geometry processing library. We have a wide functionality including construction of sparse discrete differential geometry operators and finite-elements matrices such as the cotangent Laplacian and diagonalized mass matrix, simple facet and edge-based topology data structures, mesh-viewing utilities for OpenGL and GLSL, and many core functions for matrix manipulation which make Eigen feel a lot more like MATLAB.",
"homepage": "https://github.com/libigl/libigl",
"license": "MPL-2.0",
@ -38,7 +38,7 @@
},
"copyleft": {
"description": "Build copyleft core module",
"license": "MPL-2.0 AND GPL-2.0"
"license": "MPL-2.0 AND GPL-2.0-only"
},
"embree": {
"description": "Build with embree",

View File

@ -488,9 +488,6 @@ imcce-openfa:arm64-linux=fail
imgui[allegro5-binding]:arm64-linux=cascade
imgui[glfw-binding]:arm64-linux=cascade
imgui[glut-binding]:arm64-linux=cascade
imgui[sdl3-binding]:arm64-linux=cascade
imgui[sdl3-renderer-binding]:arm64-linux=cascade
imgui[sdlgpu3-binding]:arm64-linux=cascade
imgui-sfml:arm64-linux=cascade
infoware[opengl]:arm64-linux=feature-fails
infoware[x11]:arm64-linux=feature-fails

View File

@ -3945,12 +3945,12 @@
"port-version": 0
},
"imgui": {
"baseline": "1.92.6",
"baseline": "1.92.7",
"port-version": 0
},
"imgui-node-editor": {
"baseline": "0.9.3",
"port-version": 3
"port-version": 4
},
"imgui-sfml": {
"baseline": "3.0",
@ -5090,7 +5090,7 @@
},
"libigl": {
"baseline": "2.6.0",
"port-version": 1
"port-version": 2
},
"libilbc": {
"baseline": "3.0.4",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "26cc9539d58c712d9d0d25cd2942c7c57211261c",
"version": "0.9.3",
"port-version": 4
},
{
"git-tree": "0d6ac41280085ce41ea4b866e22dd9abdd8d68fa",
"version": "0.9.3",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "28bd3aa7937eeaaa7881c7cc4ece5b5d52a77657",
"version": "1.92.7",
"port-version": 0
},
{
"git-tree": "7e6a11bf1f9d01f199f4a9b8076b1f01252b66ad",
"version": "1.92.6",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "86c2e68c1ed184cd966a102eb0d38551cc700f3b",
"version": "2.6.0",
"port-version": 2
},
{
"git-tree": "a7399f1d2c70c963c6cc0a92e4ac592d3e4b1ba6",
"version": "2.6.0",