egui_vulkano

Crates.ioegui_vulkano
lib.rsegui_vulkano
version0.8.0
sourcesrc
created_at2021-04-20 15:52:43.249253
updated_at2022-05-07 17:50:11.567794
descriptionVulkano graphics backend for egui
homepagehttps://github.com/derivator/egui_vulkano
repositoryhttps://github.com/derivator/egui_vulkano
max_upload_size
id387152
size116,440
(derivator)

documentation

README

Vulkano backend for egui

Latest version Documentation

This is a drawing backend to use egui with Vulkano. It can be used with egui-winit for input handling.

Usage

let mut egui_painter = egui_vulkano::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 egui_output = egui_ctx.end_frame();
let result = egui_painter.update_textures(egui_output.textures_delta, &mut builder).unwrap();
// If using egui-winit:
egui_winit.handle_platform_output(surface.window(), &egui_ctx, egui_output.platform_output);

// Do your own rendering ...

// Automatically start the next render subpass and draw the gui
egui_painter
    .draw(
        &mut builder, // your vulkano AutoCommandBufferBuilder
        [width, height], // window size
        &egui_ctx, // your egui CtxRef
        egui_output.shapes // shapes from egui,
    )
    .unwrap();

Check the included working example for more info.

Pull requests are welcome!

Credits

With inspiration from egui_winit_ash_vk_mem, egui_sdl2_gl and egui_glium.

Commit count: 24

cargo fmt