Skip to content

Commit

Permalink
Enable egui_glow's winit feature on wasm (#4420) (#4421)
Browse files Browse the repository at this point in the history
Reverts change in #1303, enabling the egui_glow::winit module when using
wasm.

* Closes <#4420>
  • Loading branch information
simon-frankau authored Apr 29, 2024
1 parent 0bc59f5 commit c1fc921
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion crates/egui_glow/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ x11 = ["winit?/x11"]

[dependencies]
egui = { workspace = true, default-features = false, features = ["bytemuck"] }
egui-winit = { workspace = true, optional = true, default-features = false }

bytemuck = "1.7"
glow.workspace = true
Expand All @@ -66,7 +67,6 @@ document-features = { workspace = true, optional = true }

# Native:
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
egui-winit = { workspace = true, optional = true, default-features = false }
puffin = { workspace = true, optional = true }
winit = { workspace = true, optional = true, default-features = false, features = [
"rwh_06", # for compatibility with egui-winit
Expand Down
4 changes: 2 additions & 2 deletions crates/egui_glow/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ mod vao;

pub use shader_version::ShaderVersion;

#[cfg(all(not(target_arch = "wasm32"), feature = "winit"))]
#[cfg(feature = "winit")]
pub mod winit;
#[cfg(all(not(target_arch = "wasm32"), feature = "winit"))]
#[cfg(feature = "winit")]
pub use winit::*;

/// Check for OpenGL error and report it using `log::error`.
Expand Down

0 comments on commit c1fc921

Please sign in to comment.