mirror of
https://github.com/emilk/egui.git
synced 2026-06-27 15:13:12 -04:00
Re-implement PaintCallbacks With Support for WGPU (#1684)
* Re-implement PaintCallbacks With Support for WGPU This makes breaking changes to the PaintCallback system, but makes it flexible enough to support both the WGPU and glow backends with custom rendering. Also adds a WGPU equivalent to the glow demo for custom painting.
This commit is contained in:
@@ -170,6 +170,8 @@ impl AppRunner {
|
||||
storage: Some(&storage),
|
||||
#[cfg(feature = "glow")]
|
||||
gl: Some(painter.painter.gl().clone()),
|
||||
#[cfg(feature = "wgpu")]
|
||||
render_state: None,
|
||||
});
|
||||
|
||||
let frame = epi::Frame {
|
||||
@@ -178,6 +180,8 @@ impl AppRunner {
|
||||
storage: Some(Box::new(storage)),
|
||||
#[cfg(feature = "glow")]
|
||||
gl: Some(painter.gl().clone()),
|
||||
#[cfg(feature = "wgpu")]
|
||||
render_state: None,
|
||||
};
|
||||
|
||||
let needs_repaint: std::sync::Arc<NeedRepaint> = Default::default();
|
||||
|
||||
Reference in New Issue
Block a user