From e441247d61d48caab62902858ccb69a9a7316e8a Mon Sep 17 00:00:00 2001 From: Andrey Lesnikov Date: Fri, 26 Dec 2014 01:28:48 +0300 Subject: Removed 'extern crate gl_generator' --- src/lib.rs | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index a1c0a28..6a736cd 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -28,8 +28,6 @@ //! //! By default only `window` is enabled. -#[phase(plugin)] extern crate gl_generator; - extern crate gl_common; extern crate libc; -- cgit v1.2.3 From 9a5f02984d3c157c962f493c981d1f8e7bd4ac81 Mon Sep 17 00:00:00 2001 From: Andrey Lesnikov Date: Fri, 26 Dec 2014 01:29:54 +0300 Subject: android: Implemented basic poll_events() --- src/android/mod.rs | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/src/android/mod.rs b/src/android/mod.rs index 3a86779..7279f99 100644 --- a/src/android/mod.rs +++ b/src/android/mod.rs @@ -212,16 +212,6 @@ impl Window { } pub fn poll_events(&self) -> Vec { - use std::time::Duration; - use std::io::timer; - timer::sleep(Duration::milliseconds(16)); - Vec::new() - } - - pub fn wait_events(&self) -> Vec { - use std::time::Duration; - use std::io::timer; - timer::sleep(Duration::milliseconds(16)); let mut events = Vec::new(); loop { match self.event_rx.try_recv() { @@ -244,6 +234,13 @@ impl Window { events } + pub fn wait_events(&self) -> Vec { + use std::time::Duration; + use std::io::timer; + timer::sleep(Duration::milliseconds(16)); + self.poll_events() + } + pub fn make_current(&self) { unsafe { ffi::egl::MakeCurrent(self.display, self.surface, self.surface, self.context); -- cgit v1.2.3