mirror of
https://github.com/emilk/egui.git
synced 2026-06-26 22:53:14 -04:00
Make sure to destroy the custom 3d example
This commit is contained in:
@@ -47,6 +47,10 @@ impl epi::App for Custom3dApp {
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
fn on_exit(&mut self, gl: &glow::Context) {
|
||||
self.rotating_triangle.lock().destroy(gl);
|
||||
}
|
||||
}
|
||||
|
||||
impl Custom3dApp {
|
||||
@@ -166,8 +170,6 @@ impl RotatingTriangle {
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: figure out how to call this in a nice way
|
||||
#[allow(unused)]
|
||||
fn destroy(self, gl: &glow::Context) {
|
||||
use glow::HasContext as _;
|
||||
unsafe {
|
||||
|
||||
@@ -132,6 +132,15 @@ impl epi::App for WrapApp {
|
||||
|
||||
self.ui_file_drag_and_drop(ctx);
|
||||
}
|
||||
|
||||
fn on_exit(&mut self, gl: &glow::Context) {
|
||||
self.apps.demo.on_exit(gl);
|
||||
self.apps.easy_mark_editor.on_exit(gl);
|
||||
self.apps.http.on_exit(gl);
|
||||
self.apps.clock.on_exit(gl);
|
||||
self.apps.color_test.on_exit(gl);
|
||||
self.apps.custom_3d.on_exit(gl);
|
||||
}
|
||||
}
|
||||
|
||||
impl WrapApp {
|
||||
|
||||
Reference in New Issue
Block a user