pub trait PeterEngineApp: Send + 'static {
    const WINDOW_TITLE: &'static str;
    const SHADER_SOURCE: &'static str;

    // Required methods
    fn init(
        &mut self,
        cc: &CreationContext<'_>,
        render_data: &mut RenderData<Self>
    );
    fn update(&mut self, egui_ctx: &Context, frame: &mut Frame, dt: f32);
    fn prepare(
        &mut self,
        render_data: &mut RenderData<Self>,
        encoder: &mut CommandEncoder
    ) -> Vec<CommandBuffer>;
    fn paint(
        &mut self,
        render_data: &RenderData<Self>,
        info: PaintCallbackInfo,
        render_pass: &mut RenderPass<'_>
    );

    // Provided method
    fn central_panel_input(
        &mut self,
        _egui_ctx: &Context,
        _response: Response,
        _allocated_rect: &Rect
    ) { ... }
}

Required Associated Constants§

source

const WINDOW_TITLE: &'static str

source

const SHADER_SOURCE: &'static str

Required Methods§

source

fn init(&mut self, cc: &CreationContext<'_>, render_data: &mut RenderData<Self>)

source

fn update(&mut self, egui_ctx: &Context, frame: &mut Frame, dt: f32)

source

fn prepare( &mut self, render_data: &mut RenderData<Self>, encoder: &mut CommandEncoder ) -> Vec<CommandBuffer>

source

fn paint( &mut self, render_data: &RenderData<Self>, info: PaintCallbackInfo, render_pass: &mut RenderPass<'_> )

Provided Methods§

source

fn central_panel_input( &mut self, _egui_ctx: &Context, _response: Response, _allocated_rect: &Rect )

Object Safety§

This trait is not object safe.

Implementors§