From 39128dd7e11ffa05eb06933cb6e3ce0e750e8806 Mon Sep 17 00:00:00 2001 From: Pierre Krieger Date: Tue, 16 Jun 2015 13:48:08 +0200 Subject: Remove the is_closed function --- README.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index 8765f37..9ca5757 100644 --- a/README.md +++ b/README.md @@ -49,12 +49,14 @@ fn main() { gl::ClearColor(0.0, 1.0, 0.0, 1.0); } - while !window.is_closed() { - window.wait_events(); - + for event in window.wait_events() { unsafe { gl::Clear(gl::COLOR_BUFFER_BIT) }; - window.swap_buffers(); + + match event { + glutin::Event::Closed => break, + _ => () + } } } ``` -- cgit v1.2.3