Make output format of iced_wgpu configurable
This commit is contained in:
parent
e680fd27e7
commit
be14aca075
11 changed files with 69 additions and 22 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue