aboutsummaryrefslogtreecommitdiffstats
path: root/src/api/win32
diff options
context:
space:
mode:
authortomaka <pierre.krieger1708@gmail.com>2015-04-30 16:54:57 +0200
committertomaka <pierre.krieger1708@gmail.com>2015-04-30 16:54:57 +0200
commita08388bca1ca275fd1455ceae26ab06c02c81111 (patch)
treebfe880b9378090be3a09e02507b5e1561f3738e9 /src/api/win32
parent735df1c7d83d51c26ab852c843935341ae84e281 (diff)
parent36de5a5e5a058602bcd98d9387f0f170a0fc55d4 (diff)
downloadglutin-a08388bca1ca275fd1455ceae26ab06c02c81111.tar.gz
glutin-a08388bca1ca275fd1455ceae26ab06c02c81111.zip
Merge pull request #414 from tomaka/pf-win32
Add pixelformat for cocoa and remove individual color components
Diffstat (limited to 'src/api/win32')
-rw-r--r--src/api/win32/init.rs10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/api/win32/init.rs b/src/api/win32/init.rs
index a9d77d1..39b9d97 100644
--- a/src/api/win32/init.rs
+++ b/src/api/win32/init.rs
@@ -438,9 +438,7 @@ unsafe fn enumerate_native_pixel_formats(hdc: &WindowWrapper) -> Vec<(PixelForma
result.push((PixelFormat {
hardware_accelerated: (output.dwFlags & winapi::PFD_GENERIC_FORMAT) == 0,
- red_bits: output.cRedBits,
- green_bits: output.cGreenBits,
- blue_bits: output.cBlueBits,
+ color_bits: output.cRedBits + output.cGreenBits + output.cBlueBits,
alpha_bits: output.cAlphaBits,
depth_bits: output.cDepthBits,
stencil_bits: output.cStencilBits,
@@ -489,9 +487,9 @@ unsafe fn enumerate_arb_pixel_formats(extra: &gl::wgl_extra::Wgl, hdc: &WindowWr
result.push((PixelFormat {
hardware_accelerated: true,
- red_bits: get_info(index, gl::wgl_extra::RED_BITS_ARB) as u8,
- green_bits: get_info(index, gl::wgl_extra::GREEN_BITS_ARB) as u8,
- blue_bits: get_info(index, gl::wgl_extra::BLUE_BITS_ARB) as u8,
+ color_bits: get_info(index, gl::wgl_extra::RED_BITS_ARB) as u8 +
+ get_info(index, gl::wgl_extra::GREEN_BITS_ARB) as u8 +
+ get_info(index, gl::wgl_extra::BLUE_BITS_ARB) as u8,
alpha_bits: get_info(index, gl::wgl_extra::ALPHA_BITS_ARB) as u8,
depth_bits: get_info(index, gl::wgl_extra::DEPTH_BITS_ARB) as u8,
stencil_bits: get_info(index, gl::wgl_extra::STENCIL_BITS_ARB) as u8,