Skip to content
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

Simple example doesn't work on web. #533

Closed
simbleau opened this issue Mar 25, 2024 · 2 comments
Closed

Simple example doesn't work on web. #533

simbleau opened this issue Mar 25, 2024 · 2 comments
Labels
O-WASM Applicable specifically to the wasm32 target

Comments

@simbleau
Copy link
Member

The simple example doesn't run on web, it panicks expecting there to be at least 1 GPU canvas.

Do we expect all examples to work with web?

@simbleau simbleau added the O-WASM Applicable specifically to the wasm32 target label Mar 25, 2024
@DJMcNab
Copy link
Member

DJMcNab commented Mar 25, 2024

The messiness which is proper platform support is one of the motivating reasons for the simple example

I'm intending to close this as not planned

@DJMcNab DJMcNab closed this as not planned Won't fix, can't repro, duplicate, stale Mar 25, 2024
@simbleau
Copy link
Member Author

simbleau commented Mar 25, 2024

Why not stuff all the platform support messiness into a new crate similar to scenes, e.g.
demo_driver? That would keep the simple example actually simple and dually make it easy to be imported from velato and vello_svg, and third - allow us to keep all examples running on every platform.

Passing some basic info, like draw requests, should be enough for all of the demos, but I'm just brainstorming.

e.g.

/// Doesn't return and continues to draw the next frame in a demo window with profiling and benchmarks.
fn run_demo(draw_fn: F) -> ! 
where F: FnMut(&mut Scene) + Send + Sync + 'static {
    todo!()
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
O-WASM Applicable specifically to the wasm32 target
Projects
None yet
Development

No branches or pull requests

2 participants