mirror of
https://github.com/emilk/egui.git
synced 2026-08-31 05:40:03 -04:00
[egui-wgpu] Device configuration is now dependent on adapter (#2951)
* [egui-wgpu] Device configuration is now dependent on adapter Additionally, renamed `backends` into `supported_backends` and improved & unified wgpu config defaults. * improve wgpu backend default * clippy fix * formatting --------- Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
This commit is contained in:
@@ -497,21 +497,7 @@ impl Default for WebOptions {
|
||||
webgl_context_option: WebGlContextOption::BestFirst,
|
||||
|
||||
#[cfg(feature = "wgpu")]
|
||||
wgpu_options: egui_wgpu::WgpuConfiguration {
|
||||
// Use WebGPU or WebGL. Note that WebGL needs to be opted in via a wgpu feature.
|
||||
backends: wgpu::Backends::BROWSER_WEBGPU | wgpu::Backends::GL,
|
||||
device_descriptor: wgpu::DeviceDescriptor {
|
||||
label: Some("egui wgpu device"),
|
||||
features: wgpu::Features::default(),
|
||||
limits: wgpu::Limits {
|
||||
// When using a depth buffer, we have to be able to create a texture
|
||||
// large enough for the entire surface, and we want to support 4k+ displays.
|
||||
max_texture_dimension_2d: 8192,
|
||||
..wgpu::Limits::downlevel_webgl2_defaults()
|
||||
},
|
||||
},
|
||||
..Default::default()
|
||||
},
|
||||
wgpu_options: egui_wgpu::WgpuConfiguration::default(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user