diff options
Diffstat (limited to 'wgpu/src/settings.rs')
-rw-r--r-- | wgpu/src/settings.rs | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/wgpu/src/settings.rs b/wgpu/src/settings.rs index 65853ce2..f946ce0d 100644 --- a/wgpu/src/settings.rs +++ b/wgpu/src/settings.rs @@ -5,8 +5,13 @@ /// The settings of a [`Renderer`]. /// /// [`Renderer`]: ../struct.Renderer.html -#[derive(Debug, Clone, Copy, PartialEq, Eq, Default)] +#[derive(Debug, Clone, Copy, PartialEq, Eq)] pub struct Settings { + /// The output format of the [`Renderer`]. + /// + /// [`Renderer`]: ../struct.Renderer.html + pub format: wgpu::TextureFormat, + /// The bytes of the font that will be used by default. /// /// If `None` is provided, a default system font will be chosen. @@ -16,6 +21,16 @@ pub struct Settings { pub antialiasing: Option<Antialiasing>, } +impl Default for Settings { + fn default() -> Settings { + Settings { + format: wgpu::TextureFormat::Bgra8UnormSrgb, + default_font: None, + antialiasing: None, + } + } +} + /// An antialiasing strategy. #[derive(Debug, Clone, Copy, PartialEq, Eq)] pub enum Antialiasing { |