#imgui #graphics #ui #gui-applications #ui-framework #bindings

easy-imgui-renderer

Default renderer for the easy-imgui crate, using OpenGl via glow

18 releases (9 breaking)

new 0.10.0 Oct 26, 2024
0.9.0 Sep 22, 2024
0.6.1 Jul 10, 2024
0.2.4 Mar 22, 2024

#1226 in GUI

Download history 117/week @ 2024-07-01 155/week @ 2024-07-08 22/week @ 2024-07-15 9/week @ 2024-07-22 25/week @ 2024-07-29 130/week @ 2024-08-05 29/week @ 2024-08-12 21/week @ 2024-08-19 22/week @ 2024-08-26 17/week @ 2024-09-09 283/week @ 2024-09-16 135/week @ 2024-09-23 140/week @ 2024-09-30 100/week @ 2024-10-07 23/week @ 2024-10-14

485 downloads per month
Used in 2 crates (via easy-imgui-window)

MIT license

9MB
121K SLoC

C++ 103K SLoC // 0.2% comments Rust 6.5K SLoC // 0.0% comments Visual Studio Project 6.5K SLoC Objective-C++ 3.5K SLoC // 0.2% comments C 731 SLoC // 0.3% comments Visual Studio Solution 341 SLoC Batch 287 SLoC GLSL 85 SLoC Kotlin 59 SLoC // 0.1% comments Shell 3 SLoC // 0.7% comments GDB Script 1 SLoC // 0.9% comments

easy-imgui-rs

build

Build full GUI applications with Rust and Dear ImGui. It currently uses version v1.91.4.

There are several crates in this repository:

See some examples at the examples directory. The simplest one is just a few lines of code:

use easy_imgui_window::{MainWindow, MainWindowWithRenderer,
    winit::event_loop::EventLoopBuilder,
    easy_imgui as imgui,
};

fn main() {
    let event_loop = EventLoopBuilder::new().build().unwrap();
    let main_window = MainWindow::new(&event_loop, "Example").unwrap();
    let mut window = MainWindowWithRenderer::new(main_window);

    let mut app = App;

    event_loop.run(move |event, w| {
        let res = window.do_event(&mut app, &event, w);
        if res.is_break() {
            w.exit();
        }
    }).unwrap();
}

struct App;

impl imgui::UiBuilder for App {
    fn do_ui(&mut self, ui: &imgui::Ui<Self>) {
        ui.show_demo_window(None);
    }
}

Dependencies

~4–8MB
~170K SLoC