mirror of
https://github.com/italicsjenga/winit-sonoma-fix.git
synced 2025-01-11 05:21:31 +11:00
Fix events handling in examples
This commit is contained in:
parent
752c721ae1
commit
92f90220a4
|
@ -41,10 +41,9 @@ fn main() {
|
||||||
gl::ClearColor(0.0, 1.0, 0.0, 1.0);
|
gl::ClearColor(0.0, 1.0, 0.0, 1.0);
|
||||||
|
|
||||||
while !window.is_closed() {
|
while !window.is_closed() {
|
||||||
println!("{}", window.wait_events().collect::<Vec<init::Event>>());
|
|
||||||
|
|
||||||
gl::Clear(gl::COLOR_BUFFER_BIT);
|
gl::Clear(gl::COLOR_BUFFER_BIT);
|
||||||
|
|
||||||
window.swap_buffers();
|
window.swap_buffers();
|
||||||
|
|
||||||
|
println!("{}", window.wait_events().collect::<Vec<init::Event>>());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,10 +23,9 @@ fn run(window: init::Window, color: (f32, f32, f32, f32)) {
|
||||||
gl::ClearColor(color.val0(), color.val1(), color.val2(), color.val3());
|
gl::ClearColor(color.val0(), color.val1(), color.val2(), color.val3());
|
||||||
|
|
||||||
while !window.is_closed() {
|
while !window.is_closed() {
|
||||||
window.wait_events().collect::<Vec<init::Event>>();
|
|
||||||
|
|
||||||
gl::Clear(gl::COLOR_BUFFER_BIT);
|
gl::Clear(gl::COLOR_BUFFER_BIT);
|
||||||
|
|
||||||
window.swap_buffers();
|
window.swap_buffers();
|
||||||
|
|
||||||
|
window.wait_events().collect::<Vec<init::Event>>();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,10 +19,9 @@ fn main() {
|
||||||
gl::ClearColor(0.0, 1.0, 0.0, 1.0);
|
gl::ClearColor(0.0, 1.0, 0.0, 1.0);
|
||||||
|
|
||||||
while !window.is_closed() {
|
while !window.is_closed() {
|
||||||
println!("{}", window.wait_events().collect::<Vec<init::Event>>());
|
|
||||||
|
|
||||||
gl::Clear(gl::COLOR_BUFFER_BIT);
|
gl::Clear(gl::COLOR_BUFFER_BIT);
|
||||||
|
|
||||||
window.swap_buffers();
|
window.swap_buffers();
|
||||||
|
|
||||||
|
println!("{}", window.wait_events().collect::<Vec<init::Event>>());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue