Skip to content

v0.9.0

Choose a tag to compare

@github-actions github-actions released this 12 Feb 08:08
· 435 commits to main since this release

This release focuses on dear-app usability improvements for real applications (GPU configuration presets, smoother startup, and clearer redraw semantics).

Breaking Changes

  • dear-app
    • RunnerConfig gains a new required field: wgpu: WgpuConfig. Struct-literal initializers without ..Default::default() must be updated.
    • RunnerCallbacks gains a new field: on_gpu_init. Struct-literal initializers must be updated.
    • RedrawMode::Wait now truly waits (no implicit per-frame redraw). Use Poll or WaitUntil for continuous rendering.
  • Core (dear-imgui-rs)
    • PlatformIo::viewports() / PlatformIo::viewports_mut() are no longer public APIs; use PlatformIo::viewports_iter() / PlatformIo::viewports_iter_mut() instead.
  • Backends
    • dear-imgui-winit: multi_viewport::ViewportData is no longer a public API (internal backend detail).
    • dear-imgui-wgpu: multi_viewport::{ViewportWgpuData} and multi_viewport_sdl3::{ViewportWgpuData} are no longer public APIs (internal renderer details).
  • Extensions
    • dear-file-browser: SortBy gains a new variant Type (IGFD-style filter-aware "Type" sorting). Downstream exhaustive match statements must be updated.
  • *-sys crates (prebuilt downloads)
    • Prebuilt downloads/extraction are now gated behind the Cargo feature prebuilt. If you set *_SYS_PREBUILT_URL to an http(s)://... URL or to a .tar.gz archive, or set *_SYS_USE_PREBUILT=1, you must also enable --features prebuilt.
    • Default builds do not enable prebuilt (and therefore do not pull in HTTP client dependencies like ureq). (Fixes #12)

Added

  • dear-app
    • WgpuConfig and RunnerConfig::wgpu: configure instance/adapter/device selection (backends, power preference, required features/limits, memory hints, etc.).
    • WgpuPreset and WgpuConfig::from_preset: curated presets for common scenarios (performance, low-power, downlevel compatibility, software fallback).
    • AppBuilder::on_gpu_init: a lifecycle hook for one-time GPU resource initialization after Device/Queue/SurfaceConfiguration are available.
    • pub use wgpu; re-export as dear_app::wgpu for downstream convenience.
  • Core (dear-imgui-rs)
    • Ui::set_window_focus: focus a window by name, or clear focus via None (SetWindowFocus(NULL)).
    • Context::{register_user_texture,unregister_user_texture}: safe wrappers for ImGui's experimental RegisterUserTexture() API to include user-created ImTextureData in DrawData::textures().
    • Context::register_user_texture_token: RAII helper returning RegisteredUserTexture which unregisters on drop.
    • Threaded renderer support: render::snapshot module with FrameSnapshot (Send + Sync) for Extract → Render architectures (e.g. Bevy). Snapshots include Rust-owned draw lists/commands and managed texture requests extracted from DrawData::textures().
    • render::snapshot::TextureFeedback and PlatformIo::apply_texture_feedback: apply renderer-thread results (TexID/status) back to ImGui-managed textures on the UI thread.
    • Context::platform_io_mut is now available without the multi-viewport feature (enables applying texture feedback even when viewports are disabled).
    • dear_imgui_rs::fonts module path is now public (e.g. dear_imgui_rs::fonts::FontConfig).
    • PlatformIo::{platform_create_vk_surface_raw,set_platform_create_vk_surface_raw}: access to ImGui's optional Platform_CreateVkSurface callback (used by Vulkan renderers with SDL2/SDL3/GLFW/Win32 multi-viewport).
    • Input capture hints: Ui::set_next_frame_want_capture_keyboard / Ui::set_next_frame_want_capture_mouse.
    • Navigation: Ui::set_nav_cursor_visible.
    • Drag and drop: Ui::drag_drop_payload (GetDragDropPayload).
    • Focus utilities: FocusedFlags, Ui::is_window_focused_with_flags.
    • Window builder: Window::size_constraints and Window::scroll (SetNextWindowSizeConstraints, SetNextWindowScroll).
    • Window runtime control: Ui::set_window_pos*, Ui::set_window_size*, Ui::set_window_collapsed*.
    • Shortcut routing: KeyChord, KeyMods, InputFlags, plus Ui::shortcut / Ui::set_next_item_shortcut / Ui::is_key_chord_pressed.
    • Vector sliders: Ui::slider_float2/3/4 and Ui::slider_int2/3/4.
    • Ui::checkbox_flags is now aliased as CheckboxFlags (matches ImGui semantics, no sys call needed).
    • Tab helpers: Ui::tab_item_button* and Ui::set_tab_item_closed.
    • Color defaults: Ui::set_color_edit_options (SetColorEditOptions).
    • Color packing helpers: Ui::get_color_u32* and Ui::style_color now uses GetStyleColorVec4; Color::{to_imgui_u32,from_imgui_u32} now use ColorConvert*.
    • State storage: Ui::state_storage, Ui::push_state_storage, Ui::set_next_item_storage_id, plus OwnedStateStorage.
    • Misc queries: Ui::window_viewport, Ui::tree_node_to_label_spacing, Ui::item_id, Ui::is_item_edited.
    • More queries: Ui::calc_item_width, Ui::is_mouse_pos_valid*, Ui::is_mouse_released_with_delay, Ui::find_viewport_by_id, Ui::find_viewport_by_platform_handle.
    • Context helpers: clipboard (Context::clipboard_text, Context::set_clipboard_text) and INI disk IO (Context::load_ini_settings_from_disk, Context::save_ini_settings_to_disk).
    • Logging helpers: Ui::log_to_tty, Ui::log_to_file_default, Ui::log_to_file, Ui::log_to_clipboard, Ui::log_buttons, Ui::log_finish.
    • Popup helper: Ui::open_popup_on_item_click / Ui::open_popup_on_item_click_with_flags.
  • Backends
    • dear-imgui-ash: external texture helpers mirroring WGPU (register_external_texture_with_sampler, update_external_texture_view, update_external_texture_sampler, unregister_texture).
    • dear-imgui-ash: multi-viewport-sdl3 feature to render secondary viewports when using the SDL3 platform backend (creates surfaces via Platform_CreateVkSurface).
    • dear-imgui-wgpu: add feature-gated support for both wgpu v28 (default) and v27 (wgpu-27), to better match ecosystems pinned to a specific major.
  • Examples
    • threaded_snapshot_minimal: headless multi-thread example demonstrating FrameSnapshot + TextureFeedback (no real GPU renderer).
  • Extensions
    • dear-file-browser (ImGui backend parity with ImGuiFileDialog)
      • Breadcrumb path composer: end-aligned tail visibility + separator quick-select popup rendered as an IGFD-style path table.
      • Footer: IGFD-like editable file field in Open modes (type a file name/path and confirm), plus improved PickFolder confirm semantics.
      • Columns/sorting: add SortBy::Type and make the "Type" column filter-aware (multi-dot extraction matches IGFD behavior).

Changed

  • dear-app
    • Theme application now uses the safe high-level dear-imgui-rs Theme/ThemePreset API (avoids direct sys::igStyleColors* usage).
    • Acquire the swapchain texture later in the frame to reduce the time the surface image is held.
    • restore_previous_geometry = false now disables INI persistence by forcing the INI filename to None.
  • Examples
    • ash_textures / wgpu_textures: register user-created TextureData via Context::register_user_texture_token() (no manual pre-warm update_texture() needed).
    • sdl3_ash_multi_viewport: SDL3 + Ash multi-viewport example, including external Vulkan texture + sampler toggle.

Fixed

  • dear-app
    • Per-frame OS cursor/IME state updates via prepare_render_with_ui (more correct cursor shape + IME toggling).
    • More reliable recovery when recreating the window/GPU stack after fatal surface errors; if recreation fails, on_exit is called with the old context for cleanup.
    • WaitUntil { fps } control flow now uses fps to schedule the next wake consistently.
  • Extensions
    • dear-file-browser
      • DialogManager::open_browser* now opens dialogs by default (visible immediately), matching the IGFD-style OpenDialog -> Display flow.
      • Filters now default to the first configured filter unless the user explicitly selects "All files".