aboutsummaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorTomaka17 <pierre.krieger1708@gmail.com>2014-09-11 18:13:50 +0200
committerTomaka17 <pierre.krieger1708@gmail.com>2014-09-11 18:28:07 +0200
commit0bb82e8467f4f0acde0ba434cbc214ea9a4af476 (patch)
tree4038a9160fc43833712a6f75fea4ce8158469ff1 /examples
parentd870fa7ffa1ff5e7a6a13048ada943aea51a04a6 (diff)
downloadglutin-0bb82e8467f4f0acde0ba434cbc214ea9a4af476.tar.gz
glutin-0bb82e8467f4f0acde0ba434cbc214ea9a4af476.zip
Add basic support for Android
Diffstat (limited to 'examples')
-rw-r--r--examples/fullscreen.rs9
-rw-r--r--examples/multiwindow.rs9
-rw-r--r--examples/window.rs9
3 files changed, 27 insertions, 0 deletions
diff --git a/examples/fullscreen.rs b/examples/fullscreen.rs
index 6658342..f0aab47 100644
--- a/examples/fullscreen.rs
+++ b/examples/fullscreen.rs
@@ -1,9 +1,18 @@
+#![feature(phase)]
+
+#[cfg(target_os = "android")]
+#[phase(plugin, link)]
+extern crate android_glue;
+
extern crate gl;
extern crate gl_init;
extern crate libc;
use std::io::stdio::stdin;
+#[cfg(target_os = "android")]
+android_start!(main)
+
fn main() {
// enumerating monitors
let monitor = {
diff --git a/examples/multiwindow.rs b/examples/multiwindow.rs
index e65ad5f..df52ab2 100644
--- a/examples/multiwindow.rs
+++ b/examples/multiwindow.rs
@@ -1,7 +1,16 @@
+#![feature(phase)]
+
+#[cfg(target_os = "android")]
+#[phase(plugin, link)]
+extern crate android_glue;
+
extern crate gl;
extern crate gl_init;
extern crate libc;
+#[cfg(target_os = "android")]
+android_start!(main)
+
fn main() {
let window1 = gl_init::Window::new().unwrap();
let window2 = gl_init::Window::new().unwrap();
diff --git a/examples/window.rs b/examples/window.rs
index f184dc3..5621b3c 100644
--- a/examples/window.rs
+++ b/examples/window.rs
@@ -1,7 +1,16 @@
+#![feature(phase)]
+
+#[cfg(target_os = "android")]
+#[phase(plugin, link)]
+extern crate android_glue;
+
extern crate gl;
extern crate gl_init;
extern crate libc;
+#[cfg(target_os = "android")]
+android_start!(main)
+
fn main() {
let window = gl_init::Window::new().unwrap();