Expose setting to disable vsync if requested.

- This improves rendering performance on windows 10x and doesn't result in noticeable tearing. The user can decide if they want it anyways.
This commit is contained in:
dtzxporter 2025-03-11 10:45:43 -04:00
parent 6bf709e03e
commit 5dcab9bf3a
3 changed files with 19 additions and 0 deletions

View file

@ -16,6 +16,11 @@ pub struct Settings {
///
/// By default, it is `None`.
pub antialiasing: Option<Antialiasing>,
/// Whether or not to synchronize frames.
///
/// By default, it is `true`.
pub vsync: bool,
}
impl Default for Settings {
@ -24,6 +29,7 @@ impl Default for Settings {
default_font: Font::default(),
default_text_size: Pixels(16.0),
antialiasing: None,
vsync: true,
}
}
}