Crates.io | imgui-glfw-rs |
lib.rs | imgui-glfw-rs |
version | 0.4.1 |
source | src |
created_at | 2018-12-28 10:35:24.783705 |
updated_at | 2019-08-13 17:59:23.971736 |
description | ImGui input handling for GLFW |
homepage | https://github.com/K4ugummi/imgui-glfw-rs |
repository | https://github.com/K4ugummi/imgui-glfw-rs |
max_upload_size | |
id | 104204 |
size | 243,398 |
GLFW input handling for imgui
// Use the reexported glfw crate to avoid version conflicts.
use imgui_glfw_rs::glfw;
// Use the reexported imgui crate to avoid version conflicts.
use imgui_glfw_rs::imgui;
use imgui_glfw_rs::ImguiGLFW;
// ImGui uses { ... }
fn main() {
// Initialize imgui and glfw and imgui renderer.
// { ... }
let mut imgui_glfw = ImguiGLFW::new(&mut imgui);
while !window.should_close() {
let ui = imgui_glfw.frame(&mut window, &mut imgui);
// Draw your ui.
// { ... }
window.swap_buffers();
// Handle imgui events
glfw.poll_events();
for (_, event) in glfw::flush_messages(&events) {
imgui_glfw.handle_event(&mut imgui, &event);
}
}
}
git clone https://github.com/K4ugummi/imgui-glfw-rs.git
cd imgui-glfw-rs
cargo run --example helloworld
cargo fmt