aboutsummaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorTomaka17 <pierre.krieger1708@gmail.com>2014-08-07 08:53:21 +0200
committerTomaka17 <pierre.krieger1708@gmail.com>2014-08-07 08:53:21 +0200
commit92f90220a485caf71947c6bc49e134f555f10235 (patch)
treed5d425f586d0044e8834f1b7fe485f2a82633fa5 /examples
parent752c721ae1337e770512cd7d01e0b5ec7eff6d00 (diff)
downloadglutin-92f90220a485caf71947c6bc49e134f555f10235.tar.gz
glutin-92f90220a485caf71947c6bc49e134f555f10235.zip
Fix events handling in examples
Diffstat (limited to 'examples')
-rw-r--r--examples/fullscreen.rs5
-rw-r--r--examples/multiwindow.rs5
-rw-r--r--examples/window.rs5
3 files changed, 6 insertions, 9 deletions
diff --git a/examples/fullscreen.rs b/examples/fullscreen.rs
index e5f8fd4..f05bf9d 100644
--- a/examples/fullscreen.rs
+++ b/examples/fullscreen.rs
@@ -41,10 +41,9 @@ fn main() {
gl::ClearColor(0.0, 1.0, 0.0, 1.0);
while !window.is_closed() {
- println!("{}", window.wait_events().collect::<Vec<init::Event>>());
-
gl::Clear(gl::COLOR_BUFFER_BIT);
-
window.swap_buffers();
+
+ println!("{}", window.wait_events().collect::<Vec<init::Event>>());
}
}
diff --git a/examples/multiwindow.rs b/examples/multiwindow.rs
index eeaa7d6..2ae9c31 100644
--- a/examples/multiwindow.rs
+++ b/examples/multiwindow.rs
@@ -23,10 +23,9 @@ fn run(window: init::Window, color: (f32, f32, f32, f32)) {
gl::ClearColor(color.val0(), color.val1(), color.val2(), color.val3());
while !window.is_closed() {
- window.wait_events().collect::<Vec<init::Event>>();
-
gl::Clear(gl::COLOR_BUFFER_BIT);
-
window.swap_buffers();
+
+ window.wait_events().collect::<Vec<init::Event>>();
}
}
diff --git a/examples/window.rs b/examples/window.rs
index c366ee0..07f5a84 100644
--- a/examples/window.rs
+++ b/examples/window.rs
@@ -19,10 +19,9 @@ fn main() {
gl::ClearColor(0.0, 1.0, 0.0, 1.0);
while !window.is_closed() {
- println!("{}", window.wait_events().collect::<Vec<init::Event>>());
-
gl::Clear(gl::COLOR_BUFFER_BIT);
-
window.swap_buffers();
+
+ println!("{}", window.wait_events().collect::<Vec<init::Event>>());
}
}