Ultra hyper turbo cyber mega extra über experimental!!!
frame.window()
.name(im_str!("Hello world"))
.size((300.0, 100.0), ImGuiSetCond_FirstUseEver)
.build(|| {
frame.text(im_str!("Hello world!"));
frame.text(im_str!("This...is...imgui-rs!"));
frame.separator();
let mouse_pos = frame.imgui().mouse_pos();
frame.text(im_str!("Mouse Position: ({:.1},{:.1})", mouse_pos.0, mouse_pos.1));
})
- Low-level API (ffi module)
- Renderer for easy integration with Glium projects (optional)
- Parts of high-level API
- Not horrible way of defining and passing null-terminated UTF-8 to ImGui
- Parts of imgui_demo.cpp reimplemented in Rust as an API usage example (examples/test_window.rs)
- Documentation (rustdoc)
- Support passing a custom Program to Glium renderer (e.g. from a shader cache, or custom shader)
- Closures VS begin/end pairs (current choice: closures)
- Mutable references VS return values (current choice: mutable references)
- Passing around Frame<'fr> VS passing around &'fr Frame (current choice: Frame<'fr>)
- Splitting the API to smaller pieces VS all draw calls in Frame (current choice: all draw calls in Frame)
- Builder pattern for optional arguments VS something else (current choice: builder)
- Mutation functions in builders VS self-consuming functions in builders (current choice: self-consuming)
git clone https://github.com/Gekkio/imgui-rs
cd imgui-rs
git submodule update --init --recursive
cargo test
target/debug/examples/hello_world
target/debug/examples/test_window
imgui-rs is licensed under the MIT license.