aboutsummaryrefslogtreecommitdiffstats
path: root/src/api/egl
diff options
context:
space:
mode:
authorPierre Krieger <pierre.krieger1708@gmail.com>2015-04-30 16:15:37 +0200
committerPierre Krieger <pierre.krieger1708@gmail.com>2015-04-30 16:15:37 +0200
commit36de5a5e5a058602bcd98d9387f0f170a0fc55d4 (patch)
treebfe880b9378090be3a09e02507b5e1561f3738e9 /src/api/egl
parent80c49856b24d6ddd848226ff0e7720915e554ee6 (diff)
downloadglutin-36de5a5e5a058602bcd98d9387f0f170a0fc55d4.tar.gz
glutin-36de5a5e5a058602bcd98d9387f0f170a0fc55d4.zip
Fix PixelFormat for x11, egl and win32
Diffstat (limited to 'src/api/egl')
-rw-r--r--src/api/egl/mod.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/api/egl/mod.rs b/src/api/egl/mod.rs
index 18e731c..9c8db62 100644
--- a/src/api/egl/mod.rs
+++ b/src/api/egl/mod.rs
@@ -298,9 +298,9 @@ unsafe fn enumerate_configs(egl: &ffi::egl::Egl, display: ffi::egl::types::EGLDi
result.push((config_id, PixelFormat {
hardware_accelerated: attrib!(egl, display, config_id, ffi::egl::CONFIG_CAVEAT)
!= ffi::egl::SLOW_CONFIG as i32,
- red_bits: attrib!(egl, display, config_id, ffi::egl::RED_SIZE) as u8,
- green_bits: attrib!(egl, display, config_id, ffi::egl::BLUE_SIZE) as u8,
- blue_bits: attrib!(egl, display, config_id, ffi::egl::GREEN_SIZE) as u8,
+ color_bits: attrib!(egl, display, config_id, ffi::egl::RED_SIZE) as u8 +
+ attrib!(egl, display, config_id, ffi::egl::BLUE_SIZE) as u8 +
+ attrib!(egl, display, config_id, ffi::egl::GREEN_SIZE) as u8,
alpha_bits: attrib!(egl, display, config_id, ffi::egl::ALPHA_SIZE) as u8,
depth_bits: attrib!(egl, display, config_id, ffi::egl::DEPTH_SIZE) as u8,
stencil_bits: attrib!(egl, display, config_id, ffi::egl::STENCIL_SIZE) as u8,