1#[derive(Default)]
3#[allow(missing_docs)]
4pub struct GraphicsApiInitSettings {
5 pub msaa_samples: u8,
6 pub width: u32,
7 pub height: u32,
8 pub vsync: bool,
9}
10
11#[allow(missing_docs)]
12impl GraphicsApiInitSettings {
13 pub fn msaa_samples(&self, msaa_samples: u8) -> Self {
14 Self {
15 msaa_samples,
16 ..*self
17 }
18 }
19
20 pub fn width(&self, width: u32) -> Self {
21 Self { width, ..*self }
22 }
23
24 pub fn height(&self, height: u32) -> Self {
25 Self { height, ..*self }
26 }
27
28 pub fn vsync(&self, vsync: bool) -> Self {
29 Self { vsync, ..*self }
30 }
31}