App

Trait App 

Source
pub trait App {
    // Required method
    fn ui(&mut self, ctx: &Context);

    // Provided methods
    fn handle_event(&mut self, _event: Event<'_>) { ... }
    fn request_redraw(&mut self, _viewport_id: ViewportId) -> HandleRedraw { ... }
}
Expand description

main egui-ash app trait.

Required Methods§

Source

fn ui(&mut self, ctx: &Context)

egui entry point

Provided Methods§

Source

fn handle_event(&mut self, _event: Event<'_>)

handle events of the app.

Source

fn request_redraw(&mut self, _viewport_id: ViewportId) -> HandleRedraw

redraw the app.

If you want to draw only egui, return HandleRedraw::Auto.

If you want to do your own Vulkan drawing in ash, return [HandleRedraw::Handle(RedrawHandle)] with FnOnce of drawing. NOTE: You must call egui_cmd.update_swapchain inside render function when you first render and when you recreate the swapchain.

Implementors§