crystal_api/settings.rs
1/// Unified init settings
2#[derive(Default)]
3#[allow(missing_docs)]
4pub struct GraphicsApiInitSettings {
5 pub msaa_samples: u8,
6 pub width: u32,
7 pub height: u32,
8}
9
10#[allow(missing_docs)]
11impl GraphicsApiInitSettings {
12 pub fn msaa_samples(&self, msaa_samples: u8) -> Self {
13 Self {
14 msaa_samples,
15 ..*self
16 }
17 }
18
19 pub fn width(&self, width: u32) -> Self {
20 Self { width, ..*self }
21 }
22
23 pub fn height(&self, height: u32) -> Self {
24 Self { height, ..*self }
25 }
26}