mirror of
https://github.com/emilk/egui.git
synced 2026-09-02 23:00:04 -04:00
Make egui_glow painter to work on web (#868)
Add WebGL1 and WebGL2 support to glow painter. Add "glow" feature to egui_web to use the glow painter there. Make winit an optional part of egui_glow
This commit is contained in:
@@ -23,18 +23,24 @@ all-features = true
|
||||
|
||||
[dependencies]
|
||||
egui = { version = "0.15.0", path = "../egui", default-features = false, features = ["single_threaded"] }
|
||||
egui-winit = { version = "0.15.0", path = "../egui-winit", default-features = false, features = ["epi"] }
|
||||
epi = { version = "0.15.0", path = "../epi", optional = true }
|
||||
|
||||
epi = { version = "0.15.0", path = "../epi", optional = true }
|
||||
glow = "0.11"
|
||||
glutin = "0.27"
|
||||
memoffset = "0.6"
|
||||
|
||||
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
|
||||
egui-winit = { version = "0.15.0", path = "../egui-winit", default-features = false, features = ["epi"], optional = true }
|
||||
glutin = { version = "0.27.0", optional = true }
|
||||
|
||||
[target.'cfg(target_arch = "wasm32")'.dependencies]
|
||||
web-sys = { version = "0.3", features=["console"] }
|
||||
wasm-bindgen = { version = "0.2" }
|
||||
|
||||
[dev-dependencies]
|
||||
image = { version = "0.23", default-features = false, features = ["png"] }
|
||||
|
||||
[features]
|
||||
default = ["clipboard", "default_fonts", "links", "persistence"]
|
||||
default = ["clipboard", "default_fonts", "links", "persistence", "winit"]
|
||||
|
||||
# enable cut/copy/paste to OS clipboard.
|
||||
# if disabled a clipboard will be simulated so you can still copy/paste within the egui app.
|
||||
@@ -58,3 +64,8 @@ persistence = [
|
||||
|
||||
# experimental support for a screen reader
|
||||
screen_reader = ["egui-winit/screen_reader"]
|
||||
|
||||
# enable glutin/winit integration.
|
||||
# if you want to use glow painter on web disable it.
|
||||
# if disabled reduce crate size and build time.
|
||||
winit= ["egui-winit","glutin"]
|
||||
Reference in New Issue
Block a user