pub struct Options {
pub width: u32,
pub height: u32,
pub title: String,
pub fullscreen: bool,
pub decorated: bool,
pub msaa: Option<u32>,
pub vsync: bool,
}Expand description
Options for creating a display.
Fields§
§width: u32With of the window in pixels.
height: u32Height of the window in pixels. Consider the aspect ratio (width/height) as 16/9.
title: StringTitle of the window.
fullscreen: boolWhether the window occupies all the monitor.
decorated: boolWhether the window has frame. Meaningfull when not in fullscreen mode.
msaa: Option<u32>Amount of fragments per pixel.
Gives high quality smoother edges, but costly.
Must be powers of 2 (I guess).
Consider Some(4) for good quality/performance.
Disabled if None.
vsync: boolWhether a monitor refresh must be waited between frames. Can decrease the frame rate a lot when struggling around the refresh rate. If not setted the frame rate is unbounded, which can lead to tearing.
Auto Trait Implementations§
impl Freeze for Options
impl RefUnwindSafe for Options
impl Send for Options
impl Sync for Options
impl Unpin for Options
impl UnwindSafe for Options
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