Upgrade ImGui to v1.92.7-docking and Dear Bindings to v0.19#500
Upgrade ImGui to v1.92.7-docking and Dear Bindings to v0.19#500pusewicz wants to merge 1 commit intoRandyGaul:masterfrom
Conversation
Updates the vendored ImGui core, the SDL3 / SDL_GPU3 / OpenGL3 backends, and the Dear Bindings C wrappers (dcimgui*) to match the DearBindings_v0.19_ImGui_v1.92.7-docking release. CF-specific patches preserved in imconfig.h (cute_math include, IMGUI_STB_NAMESPACE, IMGUI_API/CIMGUI_API CF_API, IM_VEC2_CLASS_EXTRA ImVec2<->CF_V2 bridge) and dcimgui.h (IMGUI_STB_NAMESPACE define). dcimgui_internal.h: emit struct ImVector_stbrp_node_im_t unconditionally. Dear Bindings v0.19 only emits it in the non-IMGUI_STB_NAMESPACE branch, leaving the type incomplete and breaking ImFontAtlasBuilder_t::PackNodes when a namespace is set.
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
This PR upgrades the vendored Dear ImGui docking branch to v1.92.7 and updates the matching Dear Bindings (dcimgui*) C wrappers to v0.19, including updated SDL3/SDL_gpu3/OpenGL3 backends and regenerated bindings glue.
Changes:
- Vendor update: ImGui core + stb headers refreshed to v1.92.7-docking.
- Backend updates: SDL3, SDL_gpu3 and OpenGL3 backend implementations updated to match upstream.
- Dear Bindings update: regenerated dcimgui* wrappers/glue updated for new internal/public APIs.
Reviewed changes
Copilot reviewed 18 out of 24 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| libraries/imgui/imstb_truetype.h | Upstream stb_truetype sync (minor comment fixes). |
| libraries/imgui/imstb_textedit.h | Upstream stb_textedit sync (insert API returns count; history/docs updated). |
| libraries/imgui/imstb_rectpack.h | Upstream stb_rectpack sync (comment typo fixes). |
| libraries/imgui/imgui_tables.cpp | Upstream tables implementation updates (reorder/display order, asserts, draw channel logic). |
| libraries/imgui/imgui_internal.h | Upstream internal API/struct updates and new helpers/macros. |
| libraries/imgui/imconfig.h | Project-specific config patches re-applied + upstream comment updates. |
| libraries/imgui/dcimgui_internal.cpp | Regenerated Dear Bindings internal glue updates for new ImGui APIs. |
| libraries/imgui/dcimgui.cpp | Regenerated Dear Bindings public glue updates + some obsolete wrapper removals/additions. |
| libraries/imgui/backends/imgui_impl_sdlgpu3_shaders.h | Updated embedded shader blobs (adds MSL sources). |
| libraries/imgui/backends/imgui_impl_sdlgpu3.h | SDL_gpu3 backend API/struct updates (sampler split, nullptr docs). |
| libraries/imgui/backends/imgui_impl_sdlgpu3.cpp | SDL_gpu3 backend updates (shader format selection, texture destroy fix, sampler creation, shutdown handler cleanup). |
| libraries/imgui/backends/imgui_impl_sdl3.h | SDL3 backend API updates (mouse capture mode override API). |
| libraries/imgui/backends/imgui_impl_sdl3.cpp | SDL3 backend updates (IME refactor, monitor event, clipboard behavior, platform handler cleanup, parent viewport support). |
| libraries/imgui/backends/imgui_impl_opengl3_loader.h | Embedded imgl3w loader updates (clear procs on shutdown). |
| libraries/imgui/backends/imgui_impl_opengl3.h | OpenGL3 backend header doc tweak (nullptr). |
| libraries/imgui/backends/imgui_impl_opengl3.cpp | OpenGL3 backend updates (loader lifecycle, texture invalid ID handling, shutdown handler cleanup). |
| libraries/imgui/LICENSE.txt | License year bumped to 2026 (upstream sync). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| ImVec2 viewport_pos; | ||
| if (ImGuiViewport* viewport = ImGui_ImplSDL3_GetViewportForWindowID(SDL_GetWindowID(window))) | ||
| viewport_pos = viewport->Pos; | ||
| SDL_Rect r; | ||
| r.x = (int)(data->InputPos.x - viewport->Pos.x); | ||
| r.y = (int)(data->InputPos.y - viewport->Pos.y + data->InputLineHeight); | ||
| r.x = (int)(data->InputPos.x - viewport_pos.x); | ||
| r.y = (int)(data->InputPos.y - viewport_pos.y); |
There was a problem hiding this comment.
viewport_pos is used even when ImGui_ImplSDL3_GetViewportForWindowID() returns null, leaving it uninitialized and causing undefined IME rectangle coordinates. Initialize it (e.g., to (0,0)) before the conditional (or set it from ImGui::GetMainViewport() as a fallback).
| fragment_shader_info.format = SDL_GPU_SHADERFORMAT_MSL; | ||
| fragment_shader_info.code = msl_fragment; | ||
| fragment_shader_info.code_size = sizeof(msl_fragment); | ||
| } |
There was a problem hiding this comment.
If neither SDL_GPU_SHADERFORMAT_METALLIB nor SDL_GPU_SHADERFORMAT_MSL is reported by SDL_GetGPUShaderFormats(), shader infos remain unset and the later SDL_CreateGPUShader() calls are likely to fail in a non-obvious way. Add an explicit else path that logs/ASSERTs with the supported format mask (or returns early), so misconfigured devices fail fast with a clear error.
| } | |
| } | |
| else | |
| { | |
| SDL_LogError(SDL_LOG_CATEGORY_RENDER, "ImGui_ImplSDLGPU3_CreateShaders(): unsupported Apple SDL_GPU shader format mask 0x%x", (unsigned int)supported_formats); | |
| IM_ASSERT(false && "ImGui_ImplSDLGPU3_CreateShaders(): device does not support METALLIB or MSL shader formats"); | |
| return; | |
| } |
| 148,161,0,0,0,0,109,97,105,110,48,97,105,114,46,115,97,109,112,108,101,95,116,101,120,116,117,114,101,95,50,100,46,118,52,102,51,50,51,50,48,50,51,46,51,54,56,97,105,114,54,52,45,97, | ||
| 112,112,108,101,45,109,97,99,111,115,120,49,52,46,48,46,48,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, | ||
| }; | ||
| static uint8_t msl_vertex[800] = |
There was a problem hiding this comment.
These shader byte arrays are not modified at runtime and should be static const uint8_t ... to place them in read-only storage and prevent accidental mutation. This also better communicates intent and can reduce writable-data footprint.
| static uint8_t msl_vertex[800] = | |
| static const uint8_t msl_vertex[800] = |
| 116,95,67,111,108,111,114,32,61,32,79,117,116,46,67,111,108,111,114,59,10,32,32,32,32,111,117,116,46,79,117,116,95,85,86,32,61,32,79,117,116,46,85,86,59,10,32,32,32,32,114,101,116, | ||
| 117,114,110,32,111,117,116,59,10,125,10,10, | ||
| }; | ||
| static uint8_t msl_fragment[580] = |
There was a problem hiding this comment.
These shader byte arrays are not modified at runtime and should be static const uint8_t ... to place them in read-only storage and prevent accidental mutation. This also better communicates intent and can reduce writable-data footprint.
| static uint8_t msl_fragment[580] = | |
| static const uint8_t msl_fragment[580] = |
| // large height (= first frame scrollbar display very off + clipper would skip lots of items). | ||
| // This is merely making the side-effect less extreme, but doesn't properly fixes it. | ||
| // FIXME: Move this to ->WidthGiven to avoid temporary lossyless? | ||
| // FIXME: Move this to ->WidthGiven to avoid temporary lossyness? |
There was a problem hiding this comment.
Typo in comment: 'lossyness' should be 'lossiness'.
| // FIXME: Move this to ->WidthGiven to avoid temporary lossyness? | |
| // FIXME: Move this to ->WidthGiven to avoid temporary lossiness? |
| } | ||
| } | ||
| // By-value struct conversions | ||
| #undef DEAR_BINDINGS_INTERNAL_GLUE_CODE// By-value struct conversions |
There was a problem hiding this comment.
The #undef directive is immediately followed by a comment with no whitespace, which hurts readability and makes the directive easy to miss. Put the comment on its own line or add spacing, e.g. keep #undef DEAR_BINDINGS_INTERNAL_GLUE_CODE on a standalone line.
| #undef DEAR_BINDINGS_INTERNAL_GLUE_CODE// By-value struct conversions | |
| #undef DEAR_BINDINGS_INTERNAL_GLUE_CODE | |
| // By-value struct conversions |
Summary
Bumps the vendored Dear ImGui from v1.92.3-docking to v1.92.7-docking and the matching Dear Bindings C wrappers (dcimgui*) to the DearBindings_v0.19_ImGui_v1.92.7-docking release.
What changed
upstream tag.
CF-specific patches re-applied
One workaround patch
incomplete when IMGUI_STB_NAMESPACE is set and breaks ImFontAtlasBuilder_t::PackNodes. v0.18 (used by 1.92.3) emitted it in both branches; this looks like an upstream regression worth filing.
How it was done
Compatibility
CF source uses only ImGui::GetIO/DestroyContext/GetDrawData and the ImGui_Impl* entry points; samples use stable widget APIs. None of the v1.92.4–v1.92.7 breaking changes (SelectOnClick → SelectOnAuto, removed
legacy Combo/ListBox callback signatures, Separator height fix, popup flag default change, Vulkan reorg, etc.) affect this codebase.
🤖 Automated upgrade using Claude.