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

easy-imgui-renderer

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

10 unstable releases (3 breaking)

new 0.4.1 May 13, 2024
0.4.0 May 11, 2024
0.3.0 Apr 11, 2024
0.2.4 Mar 22, 2024
0.1.1 Jan 27, 2024

#838 in GUI

Download history 6/week @ 2024-01-22 83/week @ 2024-02-12 32/week @ 2024-02-19 168/week @ 2024-02-26 3/week @ 2024-03-04 19/week @ 2024-03-11 308/week @ 2024-03-18 12/week @ 2024-03-25 21/week @ 2024-04-01 112/week @ 2024-04-08 9/week @ 2024-04-15 3/week @ 2024-04-22 171/week @ 2024-05-06

188 downloads per month
Used in easy-imgui-window

MIT license

8.5MB
113K SLoC

C++ 96K SLoC // 0.2% comments Visual Studio Project 6.5K SLoC Rust 6K SLoC // 0.0% comments Objective-C++ 3.5K SLoC // 0.2% comments C 731 SLoC // 0.3% comments Visual Studio Solution 301 SLoC Batch 273 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.90.6.

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

~16MB
~164K SLoC