Use two layers for image::atlas only on Gl backend
This commit is contained in:
parent
4272090d36
commit
04df889cac
5 changed files with 46 additions and 24 deletions
|
|
@ -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"),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue