diff --git a/.gitignore b/.gitignore index 878b808..adac069 100644 --- a/.gitignore +++ b/.gitignore @@ -7,6 +7,9 @@ /blade-asset/cooked /_failure.wgsl +libEGL.dylib +libGLESv2.dylib + .DS_Store /.vs /.vscode diff --git a/Cargo.toml b/Cargo.toml index f92be9b..562fdf7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -94,6 +94,8 @@ del-geo = "=0.1.29" egui-winit = "0.29" [target.'cfg(target_arch = "wasm32")'.dev-dependencies] +# see https://github.com/emilk/egui/issues/4270 +egui-winit = { version="0.29", default-features=false, features=["links"] } console_error_panic_hook = "0.1.7" console_log = "1" web-sys = { workspace = true, features = ["Window"] } diff --git a/blade-graphics/src/gles/egl.rs b/blade-graphics/src/gles/egl.rs index 9e9e5ce..70d6567 100644 --- a/blade-graphics/src/gles/egl.rs +++ b/blade-graphics/src/gles/egl.rs @@ -357,7 +357,8 @@ impl super::Context { let window_ptr = unsafe { use objc::{msg_send, runtime::Object, sel, sel_impl}; // ns_view always have a layer and don't need to verify that it exists. - let layer: *mut Object = msg_send![handle.ns_view.as_ptr(), layer]; + let layer: *mut Object = + msg_send![handle.ns_view.as_ptr() as *mut Object, layer]; layer as *mut ffi::c_void }; window_ptr diff --git a/examples/particle/main.rs b/examples/particle/main.rs index 28df139..67abbf9 100644 --- a/examples/particle/main.rs +++ b/examples/particle/main.rs @@ -371,7 +371,9 @@ fn main() { let control_flow = if let Some(repaint_after_instant) = std::time::Instant::now().checked_add(repaint_delay) { - winit::event_loop::ControlFlow::WaitUntil(repaint_after_instant) + winit::event_loop::ControlFlow::WaitUntil( + repaint_after_instant.into(), + ) } else { winit::event_loop::ControlFlow::Wait };