GithubHelp home page GithubHelp logo

egui_vulkano's Introduction

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.

egui_vulkano's People

Contributors

arc-blroth avatar derivator avatar jakoschiko avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

egui_vulkano's Issues

update to Vulkano 0.28, winit 0.26, egui 0.16

Hi, I've forked this repo for use in a personal project and managed to get the example running with Vulkano 0.28, winit 0.16, and egui 0.16. I figured I'd submit a PR just in case you or anyone else wanted to take a look.

Weird Transparency glitch on Intel Integrated Graphics

image

Running on main branch's example. Getting reported info:

> cargo run --release --example example
MESA-INTEL: warning: Performance support disabled, consider sysctl dev.i915.perf_stream_paranoid=0
Using device: Intel(R) Xe Graphics (TGL GT2) (type: IntegratedGpu)

Incorrect egui presentation on Wayland.

OS: Arch linux
DE: Plasma 5.22.5
CPU: 11th Gen Intel i5-1135G7
GPU: Intel TigerLake-LP GT2 [Iris Xe Graphics]
session type: Wayland.

Example:
Screenshot_20211012_231135

Egui and vulcano individually work great.
PS: Rust compiler complain that src/shaders/mod.rs can't find shaders.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.