mirror of
https://github.com/emilk/egui.git
synced 2026-08-31 13:50:04 -04:00
Make egui work on WebGPU out of the box. (#2945)
* Make wgpu webgl/gles opt-in (but still work out of the box via feature flag), workaround canvas creation issue * missing allow unsafe code annotations * add breaking change not to eframe release notes * Add --webgpu flag to build_demo_web.sh * Improve CHANGELOG docs * Clean up, and prepare for having to wasm:s * put canvas without workaround under `if false` * fix spelling --------- Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
This commit is contained in:
@@ -498,8 +498,8 @@ impl Default for WebOptions {
|
||||
|
||||
#[cfg(feature = "wgpu")]
|
||||
wgpu_options: egui_wgpu::WgpuConfiguration {
|
||||
// WebGPU is not stable enough yet, use WebGL emulation
|
||||
backends: wgpu::Backends::GL,
|
||||
// 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(),
|
||||
|
||||
Reference in New Issue
Block a user