Skip to main content

Crate dear_app

Crate dear_app 

Source
Expand description

Winit + WGPU application runtime for dear-imgui-rs.

The runtime keeps the main window, Dear ImGui context, and user Application stable while replacing only GPU-owned state after a device-loss signal.

use dear_app::AppConfig;

dear_app::run_ui(AppConfig::default(), |ui| {
    ui.window("Hello").build(|| ui.text("Hello, world!"));
})?;

Re-exports§

pub use dear_imgui_rs as imgui;
pub use wgpu;

Structs§

AddOns
AddOnsConfig
Optional extension contexts created with the application UI state.
AppConfig
Complete configuration shared by crate::run_ui, crate::run_frame, and crate::run.
DockingApi
EventContext
Event-time capabilities that cannot open or render a Dear ImGui frame.
ExternalTextureHandle
Opaque external texture identity bound to one GPU generation.
FrameContext
GpuApi
GpuContext
GpuGeneration
Monotonically increasing identity of the active GPU resource set.
InitContext
InitializedContext
Post-attachment initialization capabilities without Context or frame ownership.
PrepareFrameContext
Pre-frame access to Context-owned resources without frame lifecycle authority.
ShutdownContext
Terminal resource capabilities without Context or frame ownership.
WgpuConfig
Adapter and device requirements used for every GPU generation.

Enums§

ApplicationStage
Lifecycle hook that produced an Application error.
DockingConfig
Optional docking and built-in dockspace behavior.
ExternalTextureError
RedrawMode
RunError
Theme
WgpuPreset
Curated WGPU adapter and limits profiles.

Traits§

Application
Persistent user application. This value survives every GPU recreation.

Functions§

run
Runs one persistent application until the event loop exits.
run_frame
Runs an application with one fallible, exit-capable frame closure.
run_ui
Runs an application whose persistent state is captured by one UI closure.