The Wayback Machine - https://web.archive.org/web/20221207205449/https://github.com/MatchaChoco010/egui_winit_ash_vk_mem
Skip to content

MatchaChoco010/egui_winit_ash_vk_mem

main
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
src
 
 
 
 
 
 
 
 
 
 

egui_winit_ash_vk_mem

[DEPRECATED] This crate has not been maintained. Please use egui-winit-ash-integration.

Latest version Documentation MIT Apache egui version: 0.13.0

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

Example

cargo run --example example
cargo run --example user_texture

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(&mut window),
                // integration.context().tessellate(shapes), integration.paint(...)
                // in app.draw().
                app.draw().unwrap();
            }
            _ => (),
        }
    })
}
// (5) Call integration.destroy() when drop app.

Full example is in examples directory

License

MIT OR Apache-2.0

About

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

Topics

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published