From 5d703ae8849c054c2ba6c7cb5ffa0f0671faa39b Mon Sep 17 00:00:00 2001 From: Andreas Reich Date: Thu, 26 Oct 2023 09:34:01 +0200 Subject: [PATCH] fix web build --- Cargo.toml | 2 ++ crates/eframe/src/web/web_painter_wgpu.rs | 3 +-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 4237d83ea8d..2391820a0f4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -38,3 +38,5 @@ opt-level = 2 [workspace.dependencies] thiserror = "1.0.37" wgpu = "0.18.0" +# Use this to build wgpu with WebGL support on the Web *instead* of using WebGPU. +#wgpu = { version = "0.18.0", features = ["webgl"] } diff --git a/crates/eframe/src/web/web_painter_wgpu.rs b/crates/eframe/src/web/web_painter_wgpu.rs index b8ad8b3a15c..cfebf497476 100644 --- a/crates/eframe/src/web/web_painter_wgpu.rs +++ b/crates/eframe/src/web/web_painter_wgpu.rs @@ -77,8 +77,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, + ..Default::default() }); let canvas = super::canvas_element_or_die(canvas_id);