Struct event_loop::EventSettings [] [src]

pub struct EventSettings {
    pub max_fps: u64,
    pub ups: u64,
    pub swap_buffers: bool,
    pub bench_mode: bool,
}

Stores event loop settings.

Fields

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 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.

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.

Methods

impl EventSettings
[src]

Creates new with default settings.

Trait Implementations

impl Copy for EventSettings
[src]

impl Clone for EventSettings
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Debug for EventSettings
[src]

Formats the value using the given formatter.

impl Default for EventSettings
[src]

Returns the "default value" for a type. Read more

impl EventLoop for EventSettings
[src]

Returns event loop settings.

Sets event loop settings.

The number of updates per second Read more

The number of updates per second Read more

The maximum number of frames per second Read more

The maximum number of frames per second Read more

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. Read more

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. Read more