Trait peter_engine::PeterEngineApp
source · 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§
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 Methods§
fn central_panel_input( &mut self, _egui_ctx: &Context, _response: Response, _allocated_rect: &Rect )
Object Safety§
This trait is not object safe.