pub trait State: 'static {
    fn step(&mut self, window: &mut Window);

    fn cameras_and_effect(
        &mut self
    ) -> (Option<&mut dyn Camera>, Option<&mut dyn PlanarCamera>, Option<&mut dyn PostProcessingEffect>) { ... } fn cameras_and_effect_and_renderer(
        &mut self
    ) -> (Option<&mut dyn Camera>, Option<&mut dyn PlanarCamera>, Option<&mut dyn Renderer>, Option<&mut dyn PostProcessingEffect>) { ... } }
Expand description

Trait implemented by objects describing state of an application.

It is passed to the window’s render loop. Its methods are called at each render loop to update the application state, and customize the cameras and post-processing effects to be used by the renderer.

Required Methods

Method called at each render loop before a rendering.

Provided Methods

👎 Deprecated:

This will be replaced by .cameras_and_effect_and_renderer which is more flexible.

Unless cameras_and_effect_and_renderer is implemented, this method called at each render loop to retrieve the cameras and post-processing effects to be used for the next render.

Method called at each render loop to retrieve the cameras, custom renderer, and post-processing effect to be used for the next render.

Implementations on Foreign Types

Implementors