Skip to content

v0.6.0

Choose a tag to compare

@github-actions github-actions released this 28 Nov 14:25
· 677 commits to main since this release

Upgrade to Dear ImGui v1.92.5 (docking branch), adjust FFI and safe APIs for new return-by-value helpers, and refresh all C API submodules.

Added

  • Backends

    • New dear-imgui-sdl3 backend crate:
      • Thin, safe wrapper around upstream imgui_impl_sdl3.cpp + imgui_impl_opengl3.cpp.
      • Provides SDL3 platform integration for Dear ImGui and OpenGL3 rendering.
      • Includes an SDL3 + OpenGL3 multi-viewport example:
        • cargo run -p dear-imgui-examples --bin sdl3_opengl_multi_viewport --features multi-viewport
      • SDL3 + WGPU is supported via the Rust WGPU backend (dear-imgui-wgpu) with a basic example:
        • cargo run -p dear-imgui-examples --bin sdl3_wgpu
        • Multi-viewport remains disabled for WebGPU, matching upstream imgui_impl_wgpu which does not yet support multi-viewport.
    • dear-imgui-glow:
      • Experimental multi-viewport support mirroring the upstream OpenGL3 renderer backend:
        • Adds a multi_viewport helper module and multi_viewport::enable(&mut GlowRenderer, &mut Context) API.
        • Clears secondary viewports using a configurable clear color via GlowRenderer::set_viewport_clear_color.
        • Uses Dear ImGui’s ImGuiPlatformIO::Renderer_RenderWindow callback in the same way as imgui_impl_opengl3.
      • When combined with SDL3 platform backend, provides a pure-Rust SDL3 + Glow multi-viewport stack:
        • New helper dear-imgui-sdl3::init_platform_for_opengl to initialize only the SDL3 platform backend (no C++ OpenGL3 renderer).
        • New example using SDL3 + Glow multi-viewport:
          • cargo run -p dear-imgui-examples --bin sdl3_glow_multi_viewport --features multi-viewport,sdl3-backends
  • dear-imgui-rs 0.6.0

    • New drag/drop flag DragDropFlags::ACCEPT_DRAW_AS_HOVERED, wrapping ImGuiDragDropFlags_AcceptDrawAsHovered.
    • New style color StyleColor::DragDropTargetBg, exposing ImGuiCol_DragDropTargetBg.
    • Experimental WebAssembly font atlas support behind wasm-font-atlas-experimental feature (import-style provider only; APIs and behaviour may change).
  • dear-imgui-sys 0.6.0

    • Updated to Dear ImGui v1.92.5 (docking branch).
    • Updated cimgui submodule to 1.92.5dock (Dear ImGui v1.92.5-docking).
    • Regenerated FFI bindings, including new enums/fields added in 1.92.5.
    • Added pregenerated wasm bindings (wasm_bindings_pregenerated.rs) importing from module imgui-sys-v0 for import-style WASM builds.
  • Tooling / xtask

    • xtask wasm-bindgen imgui-sys-v0 generates import-style wasm bindings for dear-imgui-sys with wasm-bindgen-cli 0.2.105.
    • xtask web-demo builds the dear-imgui-web-demo wasm example, patches the wasm to import memory from env, and injects shared memory wiring into the JS glue.
    • xtask build-cimgui-provider builds an Emscripten-based imgui-sys-v0 provider (imgui-sys-v0.js + .wasm) and injects an import map mapping imgui-sys-v0 to ./imgui-sys-v0-wrapper.js.

Changed

  • Adjusted FFI signatures and safe wrappers to follow upstream return-by-value helpers introduced in 1.92.x:

    • Functions such as igGetMousePos, igGetMouseDragDelta, igGetWindowPos/Size,
      igGetCursorPos/CursorScreenPos/CursorStartPos, igGetItemRectMin/Max/Size and
      igGetContentRegionAvail now return ImVec2 instead of writing through out-parameters.
    • Docking helpers now return ImRect directly (e.g. ImGuiDockNode_Rect).
    • Text helpers such as ImFont_CalcTextSizeA and igCalcTextSize now return an ImVec2 result.
    • All affected safe APIs in dear-imgui-rs have been updated to transparently use the new signatures.
  • Inherited all bug fixes and behavior changes from Dear ImGui v1.92.5, including improved drag/drop,
    navigation, InputText, and table behavior (see upstream release notes for details).

  • Updated C API submodules for extensions to latest branches and regenerated bindings:

    • dear-implot-sys (cimplot, ImPlot C API).
    • dear-implot3d-sys (cimplot3d, ImPlot3D C API).
    • dear-imnodes-sys (cimnodes, ImNodes C API).
    • dear-imguizmo-sys (cimguizmo, ImGuizmo C API).
    • dear-imguizmo-quat-sys (cimguizmo_quat, ImGuIZMO.quat C API).
    • Safe wrappers for these crates have been adjusted as needed to match any signature changes reported by bindgen.

Multi-viewport notes (0.6.x)

  • SDL3 + OpenGL3:
    • Multi-viewport is provided by upstream C++ backends (imgui_impl_sdl3.cpp + imgui_impl_opengl3.cpp) and considered stable for desktop use.
    • The sdl3_opengl_multi_viewport example shows how to:
      • Drive Dear ImGui via the official SDL3 platform backend;
      • Render a user-provided OpenGL texture inside an ImGui window (Game View) that can be dragged to secondary OS windows.
  • SDL3 + Glow (experimental):
    • Uses SDL3 platform backend (dear-imgui-sdl3) + Rust Glow renderer backend (dear-imgui-glow).
    • Platform responsibilities (window creation, GL context switching, swap buffers) remain in the C++ SDL3 backend; rendering of all viewports is handled by GlowRenderer via multi_viewport::enable.
    • The sdl3_glow_multi_viewport example demonstrates this stack:
      • cargo run -p dear-imgui-examples --bin sdl3_glow_multi_viewport --features multi-viewport,sdl3-backends
    • This path is intended as an experimental native OpenGL alternative to the C++ imgui_impl_opengl3 renderer.
  • SDL3 + WGPU:
    • Uses the SDL3 platform backend (imgui_impl_sdl3) + Rust WGPU renderer (dear-imgui-wgpu).
    • The sdl3_wgpu example demonstrates SDL3 + WGPU integration (single window); multi-viewport remains disabled on this route for WebGPU, matching upstream imgui_impl_wgpu which does not yet implement multi-viewport.
  • Winit + WGPU:
    • Experimental multi-viewport support exists in dear-imgui-winit::multi_viewport + dear-imgui-wgpu::multi_viewport, and is exercised by the multi_viewport_wgpu example.
    • This path is not supported in 0.6.x for production use and is known to be unstable on some platforms (especially macOS/winit).
    • The example is kept as a testbed to illustrate the architecture:
      • the platform backend owns OS windows and fills ImGuiPlatformIO callbacks (create/destroy/update window, event routing);
      • the renderer backend installs Renderer_CreateWindow / Renderer_RenderWindow / Renderer_SwapBuffers callbacks to create per-viewport render targets and draw ImGui content into them.

Version Updates

All crates in the workspace have been upgraded to 0.6.0 due to the Dear ImGui v1.92.5 upgrade and C API refresh.

Core:

  • dear-imgui-sys → 0.6.0
  • dear-imgui-rs → 0.6.0

Backends:

  • dear-imgui-wgpu → 0.6.0
  • dear-imgui-glow → 0.6.0
  • dear-imgui-winit → 0.6.0

Application Framework:

  • dear-app → 0.6.0

Extensions:

  • dear-imnodes → 0.6.0 (+ dear-imnodes-sys → 0.6.0)
  • dear-implot → 0.6.0 (+ dear-implot-sys → 0.6.0)
  • dear-implot3d → 0.6.0 (+ dear-implot3d-sys → 0.6.0)
  • dear-imguizmo → 0.6.0 (+ dear-imguizmo-sys → 0.6.0)
  • dear-imguizmo-quat → 0.6.0 (+ dear-imguizmo-quat-sys → 0.6.0)
  • dear-file-browser → 0.6.0