#egui #vulkano #vulkan

egui_vulkano

Vulkano graphics backend for egui

8 releases (breaking)

0.8.0 May 7, 2022
0.7.0 Mar 26, 2022
0.6.0 Feb 23, 2022
0.5.0 Feb 7, 2022
0.1.0 Apr 20, 2021

#607 in GUI

Download history 41/week @ 2023-02-02 33/week @ 2023-02-09 34/week @ 2023-02-16 18/week @ 2023-02-23 13/week @ 2023-03-02 13/week @ 2023-03-09 13/week @ 2023-03-16 25/week @ 2023-03-23 13/week @ 2023-03-30 17/week @ 2023-04-06 30/week @ 2023-04-13 21/week @ 2023-04-20 30/week @ 2023-04-27 175/week @ 2023-05-04 22/week @ 2023-05-11 14/week @ 2023-05-18

243 downloads per month
Used in amdguid

GPL-3.0-or-later

35KB
412 lines

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.

Dependencies

~47MB
~1M SLoC