This commit is contained in:
Nathan Sobo 2023-09-29 14:04:58 -06:00
parent dcc314f088
commit 7a6c27cf24
5 changed files with 102 additions and 36 deletions

View file

@ -92,9 +92,12 @@ impl<'a, 'w> WindowContext<'a, 'w> {
cx.window.root_view = Some(root_view);
let scene = cx.window.scene.take();
dbg!(&scene);
let _ = cx.window.platform_window.read(|platform_window| {
platform_window.draw(scene);
future::ready(())
self.run_on_main(|cx| {
cx.window
.platform_window
.borrow_on_main_thread()
.draw(scene);
});
Ok(())