A very common usability issue on egui-wgpu callbacks is that `paint` can't access any data that doesn't strictly outlive the callback resources' data. E.g. if the callback resources have an `Arc` to some resource manager, you can't easily pull out resources since you statically needed to ensure that those resource references outlived the renderpass, whose lifetime was only constrained to the callback resources themselves. Wgpu 22 no longer has this restriction! Its (render/compute-)passes take care of the lifetime of any passed resource internally. The lifetime constraint is _still_ opt-out since it protects from a common runtime error of adding commands/passes on the parent encoder while a previously created pass wasn't closed yet. This is not a concern in egui-wgpu since the paint method where we have to access the render pass doesn't even have access to the encoder! |
||
|---|---|---|
| .. | ||
| src | ||
| Cargo.toml | ||
| README.md | ||
README.md
egui demo app
This app demonstrates egui and eframe.
View the demo app online at https://egui.rs.
Run it locally with cargo run --release -p egui_demo_app.
egui_demo_app can be compiled to WASM and viewed in a browser locally with:
./scripts/start_server.sh &
./scripts/build_demo_web.sh --open
egui_demo_app uses egui_demo_lib.
Running with wgpu backend
(cd egui_demo_app && cargo r --features wgpu)