[add] ios support

This commit is contained in:
Evgeny Rozaliev 2015-06-05 16:38:21 +03:00
parent 76e7a90752
commit 84703027d6
11 changed files with 902 additions and 2 deletions

47
src/platform/ios/mod.rs Normal file
View file

@ -0,0 +1,47 @@
#![cfg(target_os = "ios")]
use libc::c_void;
use BuilderAttribs;
use CreationError;
use PixelFormat;
pub use api::ios::*;
pub struct HeadlessContext(i32);
impl HeadlessContext {
/// See the docs in the crate root file.
pub fn new(_builder: BuilderAttribs) -> Result<HeadlessContext, CreationError> {
unimplemented!()
}
/// See the docs in the crate root file.
pub unsafe fn make_current(&self) {
unimplemented!()
}
pub fn swap_buffers(&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 c_void {
unimplemented!()
}
pub fn get_api(&self) -> ::Api {
::Api::OpenGlEs
}
pub fn get_pixel_format(&self) -> PixelFormat {
unimplemented!();
}
}
unsafe impl Send for HeadlessContext {}
unsafe impl Sync for HeadlessContext {}

View file

@ -12,6 +12,9 @@ mod platform;
#[cfg(target_os = "android")]
#[path="android/mod.rs"]
mod platform;
#[cfg(target_os = "ios")]
#[path="ios/mod.rs"]
mod platform;
#[cfg(all(not(target_os = "windows"), not(target_os = "linux"), not(target_os = "macos"), not(target_os = "android")))]
#[cfg(all(not(target_os = "ios"), not(target_os = "windows"), not(target_os = "linux"), not(target_os = "macos"), not(target_os = "android")))]
use this_platform_is_not_supported;