pub struct Settings {
pub scale_mode: ScaleMode,
pub framerate: Framerate,
pub vsync: bool,
pub viewport: Option<Viewport>,
}Expand description
Global engine settings.
Fields§
§scale_mode: ScaleModeTexture scaling mode, may be overriden with TextureOptions.
Defaults to ScaleMode::Nearest.
framerate: FramerateFramerate limit for update calls. Default 1x the display’s refresh rate.
vsync: boolEnable vertical sync (default off). Reduces tearing at the cost of some latency. You likely also want to set framerate if you use this.
viewport: Option<Viewport>Viewport. If this is set, it will map coordinates to fit it’s size, instead of following window coordinates.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Settings
impl RefUnwindSafe for Settings
impl Send for Settings
impl Sync for Settings
impl Unpin for Settings
impl UnwindSafe for Settings
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more