Correctly handle eglGetDisplay

This commit is contained in:
Pierre Krieger 2015-08-07 16:22:31 +02:00
parent bee3e0e0f0
commit 587dedaa9e
7 changed files with 139 additions and 23 deletions

View file

@ -165,8 +165,9 @@ unsafe fn init(title: Vec<u16>, builder: BuilderAttribs<'static>,
let context = match builder.gl_version {
GlRequest::Specific(Api::OpenGlEs, (major, minor)) => {
if let Some(egl) = egl {
if let Ok(c) = EglContext::new(egl, &builder, Some(ptr::null()))
.and_then(|p| p.finish(real_window.0))
if let Ok(c) = EglContext::new(egl, &builder,
egl::NativeDisplay::Other(Some(ptr::null())))
.and_then(|p| p.finish(real_window.0))
{
Context::Egl(c)