Crates.io | easy-imgui-sys |
lib.rs | easy-imgui-sys |
version | |
source | src |
created_at | 2024-01-26 18:46:35.942032 |
updated_at | 2024-11-08 20:21:00.562398 |
description | Low level bindings for the Dear ImGui C++ library |
homepage | |
repository | https://github.com/rodrigorc/easy-imgui-rs |
max_upload_size | |
id | 1115826 |
Cargo.toml error: | TOML parse error at line 18, column 1 | 18 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include` |
size | 0 |
Build full GUI applications with Rust and Dear ImGui. It currently uses version v1.91.5.
There are several crates in this repository:
easy-imgui-sys
: This is the direct binding of the C++ Dear ImGui library.easy-imgui
: The main binding of Dear ImGui API.easy-imgui-renderer
: A UI renderer using OpenGL and glow
.easy-imgui-window
: A fully integrated and easy to use GUI framework based on winit
.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);
}
}