egui_winit_ash_vk_mem 0.1.0

This is the egui integration crate for winit, ash and vk_mem.
docs.rs failed to build egui_winit_ash_vk_mem-0.1.0
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build: egui_winit_ash_vk_mem-0.5.0

This is the egui integration crate for winit, ash and vk_mem.

Example

cargo run --example example

Usage

fn main() -> Result<()> {
let event_loop = EventLoop::new();
// (1) Call Integration::new() in App::new().
let mut app = App::new(&event_loop)?;

event_loop.run(move |event, _, control_flow| {
*control_flow = ControlFlow::Poll;
// (2) Call integration.handle_event(&event).
app.egui_integration.handle_event(&event);
match event {
Event::WindowEvent {
event: WindowEvent::CloseRequested,
..
} => *control_flow = ControlFlow::Exit,
Event::WindowEvent {
event: WindowEvent::Resized(_),
..
} => {
// (3) Call integration.recreate_swapchain(...) in app.recreate_swapchain().
app.recreate_swapchain().unwrap();
}
Event::MainEventsCleared => app.window.request_redraw(),
Event::RedrawRequested(_window_id) => {
// (4) Call integration.begin_frame(), integration.end_frame(),
// integration.context().tessellate(shapes), integration.paint(...) and
// window.set_cursor_icon(Integration::egui_to_winit_cursor_icon(cursor_icon))
// in app.draw().
app.draw().unwrap();
}
_ => (),
}
})
}
// (5) Call integration.destroy() when drop app.

Full example is in examples directory