Trait event_loop::EventLoop [] [src]

pub trait EventLoop: Sized {
    fn get_event_settings(&self) -> EventSettings;
    fn set_event_settings(&mut self, settings: EventSettings);

    fn set_ups(&mut self, frames: u64) { ... }
    fn ups(self, frames: u64) -> Self { ... }
    fn set_max_fps(&mut self, frames: u64) { ... }
    fn max_fps(self, frames: u64) -> Self { ... }
    fn set_swap_buffers(&mut self, enable: bool) { ... }
    fn swap_buffers(self, enable: bool) -> Self { ... }
    fn set_bench_mode(&mut self, enable: bool) { ... }
    fn bench_mode(self, enable: bool) -> Self { ... }
}

Methods implemented for changing event loop settings.

Required Methods

Returns event loop settings.

Sets event loop settings.

Provided Methods

The number of updates per second

This is the fixed update rate on average over time. If the event loop lags, it will try to catch up.

The number of updates per second

This is the fixed update rate on average over time. If the event loop lags, it will try to catch up.

The maximum number of frames per second

The frame rate can be lower because the next frame is always scheduled from the previous frame. This causes the frames to "slip" over time.

The maximum number of frames per second

The frame rate can be lower because the next frame is always scheduled from the previous frame. This causes the frames to "slip" over time.

Enable or disable automatic swapping of buffers.

Enable or disable automatic swapping of buffers.

Enable or disable benchmark mode. When enabled, it will render and update without sleep and ignore input. Used to test performance by playing through as fast as possible.

Enable or disable benchmark mode. When enabled, it will render and update without sleep and ignore input. Used to test performance by playing through as fast as possible.

Implementors