Split creating an EGL context in two parts

This commit is contained in:
Pierre Krieger 2015-07-18 18:32:02 +02:00
parent c1ebb8cf31
commit 4eacfce59e
5 changed files with 112 additions and 63 deletions

View file

@ -111,8 +111,8 @@ impl Window {
return Err(OsError(format!("Android's native window is null")));
}
let context = try!(EglContext::new(egl::ffi::egl::Egl, &builder, None,
native_window as *const _));
let context = try!(EglContext::new(egl::ffi::egl::Egl, &builder, None)
.and_then(|p| p.finish(native_window as *const _)));
let (tx, rx) = channel();
android_glue::add_sender(tx);