Make sure to destroy the custom 3d example

This commit is contained in:
Emil Ernerfeldt 2022-03-22 09:17:45 +01:00
parent 9028ce7a98
commit a26f43dfe9
2 changed files with 13 additions and 2 deletions

View file

@ -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 {

View file

@ -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 {