mirror of https://github.com/emilk/egui.git
Browse Source
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!pull/4955/merge
Andreas Reich
1 month ago
committed by
GitHub
4 changed files with 36 additions and 16 deletions
Loading…
Reference in new issue