From 0eaa8fd9eb4b38169701804b0c0de273c1e73b50 Mon Sep 17 00:00:00 2001 From: Pierre Krieger Date: Fri, 1 May 2015 09:44:35 +0200 Subject: Use the EGL API with Android --- src/platform/android/mod.rs | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) (limited to 'src/platform/android') diff --git a/src/platform/android/mod.rs b/src/platform/android/mod.rs index c90d8ce..082608f 100644 --- a/src/platform/android/mod.rs +++ b/src/platform/android/mod.rs @@ -1,3 +1,38 @@ #![cfg(target_os = "android")] pub use api::android::*; + +#[cfg(feature = "headless")] +pub struct HeadlessContext(i32); + +#[cfg(feature = "headless")] +impl HeadlessContext { + /// See the docs in the crate root file. + pub fn new(_builder: BuilderAttribs) -> Result { + unimplemented!() + } + + /// See the docs in the crate root file. + pub unsafe fn make_current(&self) { + unimplemented!() + } + + /// See the docs in the crate root file. + pub fn is_current(&self) -> bool { + unimplemented!() + } + + /// See the docs in the crate root file. + pub fn get_proc_address(&self, _addr: &str) -> *const () { + unimplemented!() + } + + pub fn get_api(&self) -> ::Api { + ::Api::OpenGlEs + } +} + +#[cfg(feature = "headless")] +unsafe impl Send for HeadlessContext {} +#[cfg(feature = "headless")] +unsafe impl Sync for HeadlessContext {} -- cgit v1.2.3