Skip to content

Commit 8d23c9e

Browse files
InnocentusLimenot-fl3
authored andcommitted
Reset gl on update end
1 parent 318275a commit 8d23c9e

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/lib.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -902,7 +902,14 @@ impl Window {
902902
unsafe { CONTEXT = Some(context) };
903903

904904
Box::new(Stage {
905-
main_future: Box::pin(future),
905+
main_future: Box::pin(async {
906+
future.await;
907+
unsafe {
908+
if let Some(ctx) = CONTEXT.as_mut() {
909+
ctx.gl.reset();
910+
}
911+
}
912+
}),
906913
})
907914
});
908915
}

0 commit comments

Comments
 (0)