Implement MSAA for triangle pipeline in iced_wgpu
This commit is contained in:
parent
4969bfdb66
commit
dadae12253
15 changed files with 539 additions and 73 deletions
|
|
@ -178,6 +178,11 @@ pub trait Application: Sized {
|
|||
_settings.into(),
|
||||
iced_wgpu::Settings {
|
||||
default_font: _settings.default_font,
|
||||
antialiasing: if _settings.antialiasing {
|
||||
Some(iced_wgpu::settings::MSAA::X4)
|
||||
} else {
|
||||
None
|
||||
},
|
||||
},
|
||||
);
|
||||
|
||||
|
|
|
|||
|
|
@ -16,6 +16,15 @@ pub struct Settings {
|
|||
/// If `None` is provided, a default system font will be chosen.
|
||||
// TODO: Add `name` for web compatibility
|
||||
pub default_font: Option<&'static [u8]>,
|
||||
|
||||
/// If set to true, the renderer will try to use antialiasing for some
|
||||
/// primitives.
|
||||
///
|
||||
/// Enabling it can produce a smoother result in some widgets, like the
|
||||
/// `Canvas`, at a performance cost.
|
||||
///
|
||||
/// By default, it is disabled.
|
||||
pub antialiasing: bool,
|
||||
}
|
||||
|
||||
#[cfg(not(target_arch = "wasm32"))]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue