Trait crayon::application::Application [] [src]

pub trait Application {
    fn on_update(&mut self, _: &Context) -> Result<()> { ... }
fn on_render(&mut self, _: &Context) -> Result<()> { ... }
fn on_post_update(&mut self, _: &Context, _: &FrameInfo) -> Result<()> { ... }
fn on_receive_event(
        &mut self,
        _: &Context,
        _: ApplicationEvent
    ) -> Result<()> { ... }
fn on_exit(&mut self, _: &Context) -> Result<()> { ... } }

Application is a user-friendly facade to building application, which defines a number of event functions that get executed in a pre-determined order.

Provided Methods

Application::on_update is called every frame. Its the main workhorse function for frame updates.

Application::on_render is called before we starts rendering the scene.

Application::on_post_update is called after camera has rendered the scene.

Application::on_update is called when receiving application event.

Application::on_exit is called when exiting.

Implementors