This is a drawing backend to use egui with Vulkano. It can be used with egui-winit for input handling.
```rust let mut eguipainter = eguivulkano::Painter::new( device.clone(), // your Vulkano Device queue.clone(), // your Vulkano Queue Subpass::from(render_pass.clone(), 1).unwrap(), // subpass that you set up to render the gui ) .unwrap();
// ...
// Get the shapes from egui let eguioutput = eguictx.endframe(); let result = eguipainter.updatetextures(eguioutput.texturesdelta, &mut builder).unwrap(); // If using egui-winit: eguiwinit.handleplatformoutput(surface.window(), &eguictx, eguioutput.platform_output);
// Do your own rendering ...
// Automatically start the next render subpass and draw the gui eguipainter .draw( &mut builder, // your vulkano AutoCommandBufferBuilder [width, height], // window size &eguictx, // your egui CtxRef egui_output.shapes // shapes from egui, ) .unwrap(); ```
Check the included working example for more info.
Pull requests are welcome!
With inspiration from eguiwinitashvkmem, eguisdl2gl and egui_glium.