Switch EGL to use only pf_reqs and opengl
This commit is contained in:
parent
3ff08d747c
commit
3054e2ee02
7 changed files with 58 additions and 48 deletions
|
|
@ -112,7 +112,8 @@ impl Window {
|
|||
return Err(OsError(format!("Android's native window is null")));
|
||||
}
|
||||
|
||||
let context = try!(EglContext::new(egl::ffi::egl::Egl, &builder, egl::NativeDisplay::Android)
|
||||
let context = try!(EglContext::new(egl::ffi::egl::Egl, &builder.pf_reqs, &builder.opengl,
|
||||
egl::NativeDisplay::Android)
|
||||
.and_then(|p| p.finish(native_window as *const _)));
|
||||
|
||||
let (tx, rx) = channel();
|
||||
|
|
@ -256,7 +257,7 @@ impl HeadlessContext {
|
|||
/// See the docs in the crate root file.
|
||||
pub fn new(builder: BuilderAttribs) -> Result<HeadlessContext, CreationError> {
|
||||
let context = try!(EglContext::new(egl::ffi::egl::Egl, &builder, egl::NativeDisplay::Android));
|
||||
let context = try!(context.finish_pbuffer());
|
||||
let context = try!(context.finish_pbuffer(builder.window.dimensions.unwrap_or((800, 600)))); // TODO:
|
||||
Ok(HeadlessContext(context))
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue