aboutsummaryrefslogtreecommitdiffstats
path: root/src/api/x11/window.rs
diff options
context:
space:
mode:
authorPierre Krieger <pierre.krieger1708@gmail.com>2015-09-21 11:39:34 +0200
committerPierre Krieger <pierre.krieger1708@gmail.com>2015-09-21 12:03:59 +0200
commitb5d0a3eb67247a8ed5e43a9161f7e9567e1c1ea7 (patch)
tree5ffd202f4b14de2bb89bf45c63a5f3a69a400128 /src/api/x11/window.rs
parent8f3ec7998de74dfdb69bd1ef7f038767313b3ae1 (diff)
downloadglutin-b5d0a3eb67247a8ed5e43a9161f7e9567e1c1ea7.tar.gz
glutin-b5d0a3eb67247a8ed5e43a9161f7e9567e1c1ea7.zip
Convert GLX to the new design
Diffstat (limited to 'src/api/x11/window.rs')
-rw-r--r--src/api/x11/window.rs9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/api/x11/window.rs b/src/api/x11/window.rs
index 0a9189a..8447c7f 100644
--- a/src/api/x11/window.rs
+++ b/src/api/x11/window.rs
@@ -349,22 +349,23 @@ impl Window {
Egl(::api::egl::ContextPrototype<'a>),
}
let builder_clone = builder.clone();
- let builder_clone_opengl = builder_clone.opengl.clone().map_sharing(|_| unimplemented!());
+ let builder_clone_opengl_glx = builder_clone.opengl.clone().map_sharing(|_| unimplemented!()); // FIXME:
+ let builder_clone_opengl_egl = builder_clone.opengl.clone().map_sharing(|_| unimplemented!()); // FIXME:
let context = match builder.opengl.version {
GlRequest::Latest | GlRequest::Specific(Api::OpenGl, _) | GlRequest::GlThenGles { .. } => {
// GLX should be preferred over EGL, otherwise crashes may occur
// on X11 – issue #314
if let Some(ref glx) = display.glx {
- Prototype::Glx(try!(GlxContext::new(glx.clone(), &display.xlib, &builder_clone, display.display)))
+ Prototype::Glx(try!(GlxContext::new(glx.clone(), &display.xlib, &builder_clone.pf_reqs, &builder_clone_opengl_glx, display.display)))
} else if let Some(ref egl) = display.egl {
- Prototype::Egl(try!(EglContext::new(egl.clone(), &builder_clone.pf_reqs, &builder_clone_opengl, egl::NativeDisplay::X11(Some(display.display as *const _)))))
+ Prototype::Egl(try!(EglContext::new(egl.clone(), &builder_clone.pf_reqs, &builder_clone_opengl_egl, egl::NativeDisplay::X11(Some(display.display as *const _)))))
} else {
return Err(CreationError::NotSupported);
}
},
GlRequest::Specific(Api::OpenGlEs, _) => {
if let Some(ref egl) = display.egl {
- Prototype::Egl(try!(EglContext::new(egl.clone(), &builder_clone.pf_reqs, &builder_clone_opengl, egl::NativeDisplay::X11(Some(display.display as *const _)))))
+ Prototype::Egl(try!(EglContext::new(egl.clone(), &builder_clone.pf_reqs, &builder_clone_opengl_egl, egl::NativeDisplay::X11(Some(display.display as *const _)))))
} else {
return Err(CreationError::NotSupported);
}