Skip to content

v0.7.0

Choose a tag to compare

@github-actions github-actions released this 13 Dec 06:42
· 654 commits to main since this release

Unified release train bump to 0.7.0 with Rust-side API improvements and backend updates.
Upstream Dear ImGui/cimgui version is unchanged in this release (still Dear ImGui v1.92.5 docking, same as 0.6.0).

Highlights

  • Experimental native multi-viewport for Winit + WGPU (dear-imgui-winit::multi_viewport, dear-imgui-wgpu::multi_viewport) with multi_viewport_wgpu example.
  • Theme API + optional serde support for core enums/flags to make layouts/themes easier to persist.
  • Multi-select helpers for list/table selection (Ui::multi_select_*, Ui::table_multi_select_indexed).
  • New extension crate dear-imgui-reflect for derive-based editors (ImReflect-style auto UI).
  • dear-imgui-wgpu renderer improvements: unified errors, pipeline layout reuse, tighter texture lifetime handling, and per-texture custom samplers.
  • dear-app GPU recovery: attempts a full rebuild on fatal WGPU errors.
  • WebAssembly import-style provider module imgui-sys-v0 plus xtask commands to build the core + selected extensions.

Breaking Changes

  • dear-imgui-wgpu: removed multi-viewport feature; use multi-viewport-winit (Winit route) or multi-viewport-sdl3 (SDL3 route).
  • dear-imgui-sdl3: official OpenGL3 renderer is now opt-in behind opengl3-renderer (SDL3 platform-only by default).
    • Example: cargo run -p dear-imgui-examples --bin sdl3_opengl_multi_viewport --features multi-viewport,sdl3-opengl3

Added

  • Core (dear-imgui-sys, dear-imgui-rs)
    • Optional glam integration so glam::Vec2/Vec4 can be passed directly to drawing and coordinate-taking APIs.
    • IO: mouse source/viewport helpers (Io::add_mouse_source_event, Io::add_mouse_viewport_event, MouseSource, BackendFlags::HAS_MOUSE_HOVERED_VIEWPORT) to match latest Dear ImGui input model.
    • IO: expanded safe Io accessors for common configuration and backend fields (e.g. ini/log filenames read-only, UserData and backend user data pointers, key repeat and mouse thresholds, backend names).
    • IO, layout & style: optional serde support for core enums and flags (Key, MouseButton, MouseCursor, MouseSource, InputTextFlags, ConfigFlags, BackendFlags, ViewportFlags, WindowFlags, TableFlags, TableColumnFlags, TableRowFlags, TableBgTarget, SortDirection, StyleColor) behind the serde feature for easier hotkey, layout/table, and theme configuration persistence.
    • Styling: a small, high-level theme configuration layer (Theme, ThemePreset, ColorOverride, StyleTweaks, WindowTheme, TableTheme) on top of ImGuiStyle so applications can define reusable color/rounding/spacing presets and serialize them when the serde feature is enabled.
    • Multi-select: high-level helpers on top of BeginMultiSelect/EndMultiSelect (MultiSelectFlags, Ui::multi_select_indexed, Ui::table_multi_select_indexed, Ui::multi_select_basic, Ui::is_item_toggled_selection, BasicSelection) for list/table selection with ctrl/shift/box-select behavior.
  • New extension crate: dear-imgui-reflect
    • Derive-based helpers for generating ImGui editors for structs and enums (ImReflect-style auto UI).
  • dear-imgui-winit
    • IME support for winit 0.30 (cursor area updates and enable/disable helpers) plus a new ime_debug example.
    • Convenience API WinitPlatform::handle_window_event for ApplicationHandler-style event loops.
    • Native (pure-Rust) multi-viewport support for Winit + WGPU (platform windows/events in dear-imgui-winit::multi_viewport, renderer callbacks in dear-imgui-wgpu::multi_viewport).
      Run with: cargo run -p dear-imgui-examples --bin multi_viewport_wgpu --features multi-viewport
  • WebAssembly (import-style, experimental)
    • Import-style provider module imgui-sys-v0 and xtask commands to build the core + selected extensions (ImPlot, ImPlot3D, ImNodes, ImGuizmo, ImGuizmo.quat) for wasm32-unknown-unknown.
  • Examples
    • Texture demos (WGPU, dear-app WGPU, Glow) now ship a clean gradient test image (texture_clean.ppm) alongside the existing JPEG, making texture sampling artifacts easier to inspect.
    • style_and_fonts quickstart example now demonstrates the theme API with several ready-to-use presets (Dark/Light/Classic) plus styled themes (modern dark, Catppuccin Mocha, Darcula, Cherry) adapted from popular Dear ImGui community snippets (including ocornut/imgui#707), showing how to configure and switch custom themes in a single place.
      Run with: cargo run -p dear-imgui-examples --bin style_and_fonts

Changed

  • dear-imgui-rs

    • Align several flag types (FreeType font loader flags, child window flags) with upstream Dear ImGui constants to reduce the risk of bit mismatches on future upgrades.
  • Extensions (dear-implot, dear-implot3d, dear-imnodes, dear-imguizmo, dear-imguizmo-quat, dear-file-browser)

    • Refresh bindings to the latest C APIs and tighten safe wrappers; includes making file-extension filters in the file browser case-insensitive.
    • ImGuizmo: keep the internal helper window ("gizmo") on the main viewport when ImGui multi-viewport is enabled, preventing an extra black OS window on Windows (workaround for CedricGuillemet/ImGuizmo#378).
  • dear-imgui-wgpu

    • Unified internal error handling to use the shared RendererError type instead of ad-hoc Result<_, String> values in frame/texture paths, making GPU failures easier to diagnose.
    • Simplified pipeline/bind group layout wiring so the render pipeline now reuses the layouts owned by RenderResources/UniformBuffer, avoiding duplicated layout definitions and potential mismatches.
    • Tightened texture/bind group lifetime coupling: when ImGui textures are created, updated, or destroyed via the 1.92+ texture system, any cached image bind groups are invalidated and rebuilt on demand.
    • Minor internal cleanups (logging feature flag for multi-viewport traces, dead-code reductions) to keep the backend warning-free on newer Rust toolchains.
    • Added optional per-external-texture custom samplers. New APIs:
      register_external_texture_with_sampler and update_external_texture_sampler.
      See wgpu_rtt_gameview for a runtime sampler-switching demo.
    • Added a render-target format preflight when an adapter is provided, requiring the chosen
      render_target_format to be RENDER_ATTACHMENT-capable and blendable.
    • Experimental native multi-viewport support for SDL3 + WGPU via multi_viewport_sdl3, with a new sdl3_wgpu_multi_viewport example.
      Run with: cargo run -p dear-imgui-examples --bin sdl3_wgpu_multi_viewport --features sdl3-wgpu-multi-viewport
  • dear-app

    • Render loop now performs basic GPU/surface loss recovery: if a frame render returns a fatal GPU error, dear-app tears down the existing AppWindow and attempts to recreate the WGPU device/surface/renderer stack using the same RunnerConfig/add-ons.
    • Existing graceful handling of SurfaceError::Lost/Outdated remains in place (surface is reconfigured in-place when possible); the new logic adds a “full rebuild” path for irrecoverable errors instead of leaving the app in a broken redraw loop.