diff options
author | 2024-02-19 08:18:51 +0100 | |
---|---|---|
committer | 2024-02-19 08:18:51 +0100 | |
commit | 04df889cacfc4dfe93c2640b75f65eaafa060dba (patch) | |
tree | a59fd2d8c360a3a7b81d079e733b715e4a49db0d /wgpu/src/image.rs | |
parent | 4272090d36caf2937c170d3b28d1be1acc94a440 (diff) | |
download | iced-04df889cacfc4dfe93c2640b75f65eaafa060dba.tar.gz iced-04df889cacfc4dfe93c2640b75f65eaafa060dba.tar.bz2 iced-04df889cacfc4dfe93c2640b75f65eaafa060dba.zip |
Use two layers for `image::atlas` only on `Gl` backend
Diffstat (limited to 'wgpu/src/image.rs')
-rw-r--r-- | wgpu/src/image.rs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/wgpu/src/image.rs b/wgpu/src/image.rs index 06c22870..c8e4a4c2 100644 --- a/wgpu/src/image.rs +++ b/wgpu/src/image.rs @@ -176,7 +176,11 @@ impl Data { } impl Pipeline { - pub fn new(device: &wgpu::Device, format: wgpu::TextureFormat) -> Self { + pub fn new( + device: &wgpu::Device, + format: wgpu::TextureFormat, + backend: wgpu::Backend, + ) -> Self { let nearest_sampler = device.create_sampler(&wgpu::SamplerDescriptor { address_mode_u: wgpu::AddressMode::ClampToEdge, address_mode_v: wgpu::AddressMode::ClampToEdge, @@ -318,7 +322,7 @@ impl Pipeline { multiview: None, }); - let texture_atlas = Atlas::new(device); + let texture_atlas = Atlas::new(device, backend); let texture = device.create_bind_group(&wgpu::BindGroupDescriptor { label: Some("iced_wgpu::image texture atlas bind group"), |