1
0
mirror of https://github.com/emilk/egui.git synced 2026-08-30 13:20:05 -04:00

Clump together wgpu options in a struct

This commit is contained in:
Emil Ernerfeldt
2025-10-07 16:29:28 +02:00
parent 56b1def064
commit e5c86a549d
4 changed files with 59 additions and 36 deletions

View File

@@ -186,13 +186,15 @@ impl<'app> WgpuWinitApp<'app> {
let mut painter = pollster::block_on(egui_wgpu::winit::Painter::new(
egui_ctx.clone(),
self.native_options.wgpu_options.clone(),
self.native_options.multisampling.max(1) as _,
egui_wgpu::depth_format_from_bits(
self.native_options.depth_buffer,
self.native_options.stencil_buffer,
),
self.native_options.viewport.transparent.unwrap_or(false),
self.native_options.dithering,
egui_wgpu::RendererOptions {
msaa_samples: self.native_options.multisampling.max(1) as _,
dithering: self.native_options.dithering,
},
));
let window = Arc::new(window);