-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Find a graphics engine that works well on desktop environments and WASM #7
Comments
I got the Druid example from here working the other day (with the code from the website — the repo isn't quite the same): I like it and they say it works with Wasm. I haven't tried it on Wasm. There are other things that mention it on that page, including the comments. I know no more |
Got the egui template working as well, native and Wasm. https://github.com/emilk/egui Looks interesting, but it's one of these GUIs that completely ignores native conventions: double-click select is idiosyncratic, copy/paste doesn't work. The native one does at least use the window manager's frame. Both binaries about 4MB (stripped). |
@x31eq Thanks for digging into this! My feelings about the different frameworks are the following:
I chose Nannou arbitrarily because it was presented at RustFest. Do you think there is a compelling reason to switch to one of the other frameworks? |
The compelling reason for me is that it'd work on my desktop! I skipped Iced because of the OpenGL requirement. If I build the hello world I get
GLSL is a mathematics library. I don't know why this requires an older version. |
From what I know GLSL is a shading language. But unlike Vulkan, GLSL should work on any system...strange...! 😆 |
It isn't normal for Debian stable to provide a too recent library version. I expect this was a sign of the immature OpenGL support in Iced. The repo I pulled is pointing to a specific commit from last November. I can build the latest Iced library, I think there's some OpenGL support in there. I don't know how to specify it. Wouldn't keyboard events come from a different library? Harmoxen looks good. It works for me with Druid. The Iced branch builds against Vulkan. Egui looks promising for what it is. That isn't something I have a use for. I think I'll write something in Druid and find out what problems it has. I see it lists as a non-goal "Support rendering to HTML when targeting the web." That suggests Iced will be better on the Wasm side |
I am not sure how that would integrate with the event loops provided by the frameworks. Besides that, is there any cross-platform library for keyboard events? The closest candidate that I can think of is I might give egui a try this weekend although from reading the docs I can tell that the keyboard event model is too restricted. By the way, Bevy looks very promising but has no official support for WASM as far as I can tell. So, at the moment it looks as if Druid has all the required features: WASM and physical keyboard events. But before completely switching to another framework I will request some feedback in the Rust Subreddit. |
Current progress: I gave |
So, it seems that Druid is the most promising candidate: It comes with multi-platform support and it's designed with complex graphics in mind. The keyboard model is the best I could find in any of the GUI frameworks but I don't know how well the model works in practice. The only downside of Druid that I know of is that rendering to VST hosts is not possible at the moment (Azorlogh/harmoxen#6, @Azorlogh thanks for sharing your thoughts!). @x31eq Do you think this is a show stopper? The second best option might be Iced. It worked smoothly in my expriments and can render to VST hosts. The big problems are that it has no access to physical key locations and, since it depends on wgpu, it somehow requires a platform with Vulkan support. I hope what I say here is correct... |
Bevy is by far the best suitable framework for the task. It is
Closing this ticket now since I made my decision. |
Just waiting until nannou-org/nannou#657 is solved might be a solution.
The text was updated successfully, but these errors were encountered: