summaryrefslogtreecommitdiffstats
path: root/wgpu/src/image.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2024-02-19 08:18:51 +0100
committerLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2024-02-19 08:18:51 +0100
commit04df889cacfc4dfe93c2640b75f65eaafa060dba (patch)
treea59fd2d8c360a3a7b81d079e733b715e4a49db0d /wgpu/src/image.rs
parent4272090d36caf2937c170d3b28d1be1acc94a440 (diff)
downloadiced-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.rs8
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"),