mirror of
https://github.com/italicsjenga/winit-sonoma-fix.git
synced 2024-12-24 22:31:30 +11:00
Merge pull request #553 from tomaka/egl-default
Use EGL by default with X11
This commit is contained in:
commit
be0440666b
|
@ -334,10 +334,10 @@ impl Window {
|
||||||
let builder_clone = builder.clone();
|
let builder_clone = builder.clone();
|
||||||
let context = match builder.gl_version {
|
let context = match builder.gl_version {
|
||||||
GlRequest::Latest | GlRequest::Specific(Api::OpenGl, _) | GlRequest::GlThenGles { .. } => {
|
GlRequest::Latest | GlRequest::Specific(Api::OpenGl, _) | GlRequest::GlThenGles { .. } => {
|
||||||
if let Some(ref glx) = display.glx {
|
if let Some(ref egl) = display.egl {
|
||||||
Prototype::Glx(try!(GlxContext::new(glx.clone(), &display.xlib, &builder_clone, display.display)))
|
|
||||||
} else if let Some(ref egl) = display.egl {
|
|
||||||
Prototype::Egl(try!(EglContext::new(egl.clone(), &builder_clone, Some(display.display as *const _))))
|
Prototype::Egl(try!(EglContext::new(egl.clone(), &builder_clone, Some(display.display as *const _))))
|
||||||
|
} else if let Some(ref glx) = display.glx {
|
||||||
|
Prototype::Glx(try!(GlxContext::new(glx.clone(), &display.xlib, &builder_clone, display.display)))
|
||||||
} else {
|
} else {
|
||||||
return Err(CreationError::NotSupported);
|
return Err(CreationError::NotSupported);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue