diff options
author | 2024-03-24 08:04:28 +0100 | |
---|---|---|
committer | 2024-03-24 08:04:28 +0100 | |
commit | 4f5b63f1f4cd7d3ab72289c697f4abc767114eca (patch) | |
tree | 876f9502936b24f63ef21bb2b41e16b222750444 /wgpu/src/settings.rs | |
parent | 441e9237cd1c9c9b61d9b144b5b4dafa236ace28 (diff) | |
download | iced-4f5b63f1f4cd7d3ab72289c697f4abc767114eca.tar.gz iced-4f5b63f1f4cd7d3ab72289c697f4abc767114eca.tar.bz2 iced-4f5b63f1f4cd7d3ab72289c697f4abc767114eca.zip |
Reintroduce backend selection through `ICED_BACKEND` env var
Diffstat (limited to 'wgpu/src/settings.rs')
-rw-r--r-- | wgpu/src/settings.rs | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/wgpu/src/settings.rs b/wgpu/src/settings.rs index 9943aa3e..828d9e09 100644 --- a/wgpu/src/settings.rs +++ b/wgpu/src/settings.rs @@ -29,30 +29,6 @@ pub struct Settings { pub antialiasing: Option<Antialiasing>, } -impl Settings { - /// Creates new [`Settings`] using environment configuration. - /// - /// Specifically: - /// - /// - The `internal_backend` can be configured using the `WGPU_BACKEND` - /// environment variable. If the variable is not set, the primary backend - /// will be used. The following values are allowed: - /// - `vulkan` - /// - `metal` - /// - `dx12` - /// - `dx11` - /// - `gl` - /// - `webgpu` - /// - `primary` - pub fn from_env() -> Self { - Settings { - internal_backend: wgpu::util::backend_bits_from_env() - .unwrap_or(wgpu::Backends::all()), - ..Self::default() - } - } -} - impl Default for Settings { fn default() -> Settings { Settings { |