Upgrade imgui to 1.92.6#101
Conversation
8100546 to
b24996a
Compare
|
Ready for review ;) |
9a6f167 to
c01bb11
Compare
There was a problem hiding this comment.
Pull request overview
Updates the vendored Dear ImGui stack to 1.92.6 and aligns this repo’s Zig/C wrappers, test engine, and backend integrations with upstream API/ABI changes introduced across the 1.92.x series.
Changes:
- Exposes new default font variants (vector/bitmap) through the C API (
zgui.cpp) and Zig bindings (gui.zig). - Updates Zig bindings for newly added/changed flags, style fields, and enums to match ImGui 1.92.6.
- Syncs upstream backend/test-engine changes needed for dynamic texture updates, viewport parenting, and other 1.92.6 behavior.
Reviewed changes
Copilot reviewed 50 out of 57 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| src/zgui.cpp | Adds C wrappers for AddFontDefaultVector() / AddFontDefaultBitmap(). |
| src/gui.zig | Updates Zig API/bindings for new flags/fields/enums and new default font entry points. |
| libs/node_editor/imgui_node_editor_internal.inl | Adds missing ImRect_Floor() helper implementation for node editor internals. |
| libs/node_editor/imgui_node_editor_internal.h | Declares ImRect_Floor() helper. |
| libs/imgui_test_engine/imgui_te_utils.h | Adds IM_COUNTOF compatibility macro for older ImGui versions. |
| libs/imgui_test_engine/imgui_te_utils.cpp | Syncs upstream changes (warnings pragmas, IM_COUNTOF, logic tweaks, unused vars). |
| libs/imgui_test_engine/imgui_te_ui.cpp | Updates Test Engine UI for newer ImGui APIs and adds help popup + run behavior changes. |
| libs/imgui_test_engine/imgui_te_perftool.cpp | Syncs perf tool with new macros and warning pragmas; updates buffer-size macros. |
| libs/imgui_test_engine/imgui_te_internal.h | Adds new internal fields for host mouse position and hook state tracking. |
| libs/imgui_test_engine/imgui_te_exporters.cpp | Adds warning pragmas and small upstream portability adjustments. |
| libs/imgui_test_engine/imgui_te_engine.h | Updates public Test Engine API (teardown func, logging hook, IM_COUNTOF, check op rename). |
| libs/imgui_test_engine/imgui_te_engine.cpp | Syncs engine implementation with new APIs, teardown flow, texture macros, and robustness tweaks. |
| libs/imgui_test_engine/imgui_te_context.h | Updates context helpers/macros and adds new generic vars/status fields. |
| libs/imgui_test_engine/imgui_capture_tool.h | Updates comment to match renamed capture flag. |
| libs/imgui_test_engine/imgui_capture_tool.cpp | Syncs capture tool with warnings pragmas and IM_COUNTOF conversions. |
| libs/imgui_test_engine/LICENSE.txt | Updates copyright year. |
| libs/imgui/misc/freetype/imgui_freetype.cpp | Syncs FreeType loader integration with new ImFontConfig semantics (const correctness, ExtraSizeScale). |
| libs/imgui/imstb_textedit.h | Syncs Dear ImGui’s patched stb_textedit for new insertion semantics and wrapping/cursor behavior. |
| libs/imgui/imconfig.h | Updates upstream docs/comments about assertions, fonts, and FreeType usage. |
| libs/imgui/backends/imgui_impl_win32.h | Minor comment grammar updates. |
| libs/imgui/backends/imgui_impl_win32.cpp | Syncs Win32 backend with viewport parenting, gamepad packet optimizations, IME changes, etc. |
| libs/imgui/backends/imgui_impl_wgpu.h | Adds Emscripten defaults, extra helpers, and init struct defaults. |
| libs/imgui/backends/imgui_impl_wgpu.cpp | Syncs WGPU backend for Dawn/WGPU split and adds helper utilities. |
| libs/imgui/backends/imgui_impl_vulkan.h | Syncs Vulkan backend init structs/APIs and adds new pipeline/helper interfaces. |
| libs/imgui/backends/imgui_impl_sdlrenderer3.h | Migrates SDL3 renderer backend to texture-update path + signature changes. |
| libs/imgui/backends/imgui_impl_sdlrenderer3.cpp | Implements texture update support via ImTextureData and clears handlers on shutdown. |
| libs/imgui/backends/imgui_impl_sdlrenderer2.h | Migrates SDL2 renderer backend to texture-update path + signature changes. |
| libs/imgui/backends/imgui_impl_sdlrenderer2.cpp | Implements texture update support via ImTextureData and clears handlers on shutdown. |
| libs/imgui/backends/imgui_impl_sdlgpu3_shaders.h | Adds embedded MSL shader sources for broader macOS support. |
| libs/imgui/backends/imgui_impl_sdlgpu3.h | Extends init info + exposes render state for callbacks/sampler switching. |
| libs/imgui/backends/imgui_impl_sdlgpu3.cpp | Syncs SDLGPU3 backend (texture id change, samplers, MSL support, viewport swapchain params). |
| libs/imgui/backends/imgui_impl_sdl3.h | Adds API to control mouse-capture mode (X11/debugger ergonomics). |
| libs/imgui/backends/imgui_impl_sdl3.cpp | Syncs SDL3 platform backend (IME handling changes, mouse capture mode, parent viewport support). |
| libs/imgui/backends/imgui_impl_sdl2.h | Adds API to control mouse-capture mode (X11/debugger ergonomics). |
| libs/imgui/backends/imgui_impl_sdl2.cpp | Syncs SDL2 platform backend (mouse capture mode, clipboard behavior, handler clearing). |
| libs/imgui/backends/imgui_impl_osx.mm | Clears platform handlers on shutdown; syncs upstream changelog/comments. |
| libs/imgui/backends/imgui_impl_osx.h | Updates comments to reflect missing parent viewport support. |
| libs/imgui/backends/imgui_impl_opengl3_loader.h | Updates embedded GL loader for samplers, shutdown, and portability. |
| libs/imgui/backends/imgui_impl_opengl3.h | Updates texture-update comment to nullptr. |
| libs/imgui/backends/imgui_impl_opengl3.cpp | Syncs OpenGL3 backend (embedded loader shutdown, sampler binding tracking, texture update pixel-store). |
| libs/imgui/backends/imgui_impl_metal.mm | Syncs Metal backend for texture list and handler clearing. |
| libs/imgui/backends/imgui_impl_metal.h | Updates texture-update comment to nullptr. |
| libs/imgui/backends/imgui_impl_glfw.h | Updates comments (requirements/typos) to match upstream. |
| libs/imgui/backends/imgui_impl_dx12.h | Wraps warnings and updates texture-update comment to nullptr. |
| README.md | Updates documented versions for ImGui, Test Engine, and Node Editor. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| ctx->LogInfo("Running TestShutdownFunc:"); | ||
| IM_ASSERT(ctx->ActiveFunc == ImGuiTestActiveFunc_GuiFunc || ctx->ActiveFunc == ImGuiTestActiveFunc_TestFunc); | ||
| ctx->ActiveFunc = ImGuiTestActiveFunc_TeardownFunc; |
There was a problem hiding this comment.
The log string says "Running TestShutdownFunc:" but the callback and enum are named TeardownFunc/ImGuiTestActiveFunc_TeardownFunc. Consider renaming the log text to match the API to avoid confusion when reading test logs.
| if (ctx) | ||
| { | ||
| IM_ASSERT(ctx->ActiveFunc == ImGuiTestActiveFunc_TestFunc && "Can only yield inside TestFunc()!"); | ||
| IM_ASSERT(ctx->ActiveFunc != ImGuiTestActiveFunc_GuiFunc && "Can only yield inside a TestFunc()!"); |
There was a problem hiding this comment.
The assert now allows yielding from TeardownFunc as well as TestFunc, but the message still says "Can only yield inside a TestFunc()!". Update the message to reflect the actual allowed contexts (or to say it cannot be called from GuiFunc).
| ImStrncpy(_FilterDateFrom, "9999-99-99", IM_COUNTOF(_FilterDateFrom)); | ||
| ImStrncpy(_FilterDateTo, "0000-00-00", IM_COUNTOF(_FilterDateFrom)); |
There was a problem hiding this comment.
The copy into _FilterDateTo uses IM_COUNTOF(_FilterDateFrom) as the destination buffer size. This should use the size of _FilterDateTo to avoid incorrect bounds if the array sizes ever diverge.
c01bb11 to
0d1f385
Compare
|
I'll try to test this against our sample app repo on all platforms in the next few days |
|
Great, if everything looks good and it gets merged, I’ll prepare another PR for the fresh new version of imgui |
|
The samples fail to build against this. Something with wgpu symbols is broken: |
| // This condition is false for all other 3 cases: WGPU-Native, DAWN-Native or DAWN-EMSCRIPTEN (using --use-port=emdawnwebgpu flag) | ||
| #if defined(__EMSCRIPTEN__) && defined(IMGUI_IMPL_WEBGPU_BACKEND_WGPU) | ||
| #define IMGUI_IMPL_WEBGPU_BACKEND_WGPU_EMSCRIPTEN | ||
| #endif |
There was a problem hiding this comment.
I guess this upstream change we need to account for to fix the gpu backend build
There was a problem hiding this comment.
Problem is only with emscripten?
There was a problem hiding this comment.
Ouch, I see what you mean. Unfortunately, I don't have any experience with wgpu, so I'm not really sure how to fix it properly. The defines have changed, but we might run into a problem with the version the backend is for, and we'll have to do another workaround :( Btw, it's good to see you back
I don't plan on updating and fixing this pr so if you'd like to, please do. If you have any questions, I can help. This pr should allow easy upgrades, though. So future-proofing |
No description provided.