aboutsummaryrefslogtreecommitdiffstats
path: root/src/api/egl
diff options
context:
space:
mode:
authortomaka <pierre.krieger1708@gmail.com>2016-01-03 12:44:04 +0100
committertomaka <pierre.krieger1708@gmail.com>2016-01-03 12:44:04 +0100
commitf59be2588c47a8dab2da00f12661d204576c0bd3 (patch)
tree1be8f1e0fb27cf11ef51342ec8f3ff0bdd44fc06 /src/api/egl
parent89e7a2fda75626f57d489e196168ccebe6912bbe (diff)
parent508e8cf665d36bdb6e7b5d3d81e1118693579f5b (diff)
downloadglutin-f59be2588c47a8dab2da00f12661d204576c0bd3.tar.gz
glutin-f59be2588c47a8dab2da00f12661d204576c0bd3.zip
Merge pull request #690 from vberger/master
Fix EGL for wayland.
Diffstat (limited to 'src/api/egl')
-rw-r--r--src/api/egl/mod.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/api/egl/mod.rs b/src/api/egl/mod.rs
index 582e376..ca3dc2a 100644
--- a/src/api/egl/mod.rs
+++ b/src/api/egl/mod.rs
@@ -466,10 +466,10 @@ unsafe fn choose_fbconfig(egl: &ffi::egl::Egl, display: ffi::egl::types::EGLDisp
out.push(ffi::egl::RGB_BUFFER as c_int);
}
- if egl_version >= &(1, 3) {
- out.push(ffi::egl::SURFACE_TYPE as c_int);
- out.push((ffi::egl::WINDOW_BIT | ffi::egl::PBUFFER_BIT) as c_int);
- }
+ out.push(ffi::egl::SURFACE_TYPE as c_int);
+ // TODO: Some versions of Mesa report a BAD_ATTRIBUTE error
+ // if we ask for PBUFFER_BIT as well as WINDOW_BIT
+ out.push((ffi::egl::WINDOW_BIT) as c_int);
match (api, version) {
(Api::OpenGlEs, Some((3, _))) => {
@@ -495,7 +495,7 @@ unsafe fn choose_fbconfig(egl: &ffi::egl::Egl, display: ffi::egl::types::EGLDisp
}
},
(Api::OpenGlEs, _) => unimplemented!(),
- (Api::OpenGl, Some((1, _))) => {
+ (Api::OpenGl, _) => {
if egl_version < &(1, 3) { return Err(CreationError::NoAvailablePixelFormat); }
out.push(ffi::egl::RENDERABLE_TYPE as c_int);
out.push(ffi::egl::OPENGL_BIT as c_int);
@@ -561,7 +561,7 @@ unsafe fn choose_fbconfig(egl: &ffi::egl::Egl, display: ffi::egl::types::EGLDisp
},
}
- out.push(0);
+ out.push(ffi::egl::NONE as c_int);
out
};