Skip to content

Commit

Permalink
web fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
Wumpf committed Oct 8, 2023
1 parent 19a869d commit 751887b
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions crates/eframe/src/web/web_painter_wgpu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ impl WebPainterWgpu {
let instance = wgpu::Instance::new(wgpu::InstanceDescriptor {
backends: options.wgpu_options.supported_backends,
dx12_shader_compiler: Default::default(),
gles_minor_version: wgpu::Gles3MinorVersion::Automatic,
});

let canvas = super::canvas_element_or_die(canvas_id);
Expand Down Expand Up @@ -237,20 +238,22 @@ impl WebPainter for WebPainterWgpu {
b: clear_color[2] as f64,
a: clear_color[3] as f64,
}),
store: true,
store: wgpu::StoreOp::Store,
},
})],
depth_stencil_attachment: self.depth_texture_view.as_ref().map(|view| {
wgpu::RenderPassDepthStencilAttachment {
view,
depth_ops: Some(wgpu::Operations {
load: wgpu::LoadOp::Clear(1.0),
store: false,
store: wgpu::StoreOp::Discard,
}),
stencil_ops: None,
}
}),
label: Some("egui_render"),
occlusion_query_set: None,
timestamp_writes: None,
});

renderer.render(&mut render_pass, clipped_primitives, &screen_descriptor);
Expand Down

0 comments on commit 751887b

Please sign in to comment.