You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
thread '<unnamed>' panicked at src/main.rs:15:14:
called `Result::unwrap()` on an `Err` value: WindowHandleError(Unavailable)
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
The text was updated successfully, but these errors were encountered:
I'm not familiar with Wry, but my best guess is that it needs to be used from the main thread -- and that's pretty much the only difference between appit and a normal winit app. It may not be worth using appit with Wry, because of the extra work it might require to interact with it from a multi-threaded environment.
If you do want to try to make this work with appit, I would try doing what my project Kludgine does to ensure code is executed on the event loop. First, it uses PendingApp::new_with_event_callback to register a callback handling AppEvent<T> events. One of the types is CreateSurface, because wgpu requires that surface creation happens on the main thread. Then whenever a surface is needed, a request can be sent.
If this guess doesn't allow it to work, it might be worth asking the Wry project what is needed to ensure it can be used from other threads than the main thread.
main.rs
:Cargo.toml
:Error message:
The text was updated successfully, but these errors were encountered: