Skip to content
This repository has been archived by the owner on Apr 9, 2024. It is now read-only.

Use eframe? #86

Open
virtualritz opened this issue Mar 15, 2023 · 1 comment
Open

Use eframe? #86

virtualritz opened this issue Mar 15, 2023 · 1 comment

Comments

@virtualritz
Copy link
Contributor

I saw the app is currently not using egui's eframe.

Is there a reason for this? eframe would possibly enable web assembly/running in browser trivially and also make a bunch of platform specific integrations available effortlessly.

E.g:

  • Saving/restoring app state on close/open of app with a single:
    eframe::set_value(storage, eframe::APP_KEY, self);
  • File🠮Quit just being calling eframe::Frame::close()

etc.

@setzer22
Copy link
Owner

setzer22 commented Mar 15, 2023

Hi @virtualritz!

There is currently an ongoing rewrite to a different UI system. I haven't written a full consistent rationale yet, but you can find some of it here: #74

In that case, the project is moving further away from eframe, and I'm currently considering building on top of epaint so far with promising results:
new_gui_viewport

would possibly enable web assembly/running in browser trivially

Unfortunately, wasm support wouldn't work out of the box even when using eframe. On one hand, blackjack relies on some wgpu features (mainly storage buffers) that will only be available on WebGPU, not the WebGL backend of wgpu. And on the other hand, there are some non-Rust dependencies (currently, Luau itself, but I'm taking a look at libigl) that would make it a bit more complicated to natively compile for wasm.

That's not to say blackjack can't run on wasm, it would just take some extra work and hasn't been my priority so far.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants