diff options
author | Pierre Krieger <pierre.krieger1708@gmail.com> | 2015-03-01 11:07:46 +0100 |
---|---|---|
committer | Pierre Krieger <pierre.krieger1708@gmail.com> | 2015-03-01 11:07:46 +0100 |
commit | 7ba8fdf3f33b9502007901a2399f915047cac8fc (patch) | |
tree | beada9d85ad2d0b76ad1bbc2fbdfb113fca7313a /src/win32 | |
parent | cf252c29b4c3a0f4705bc92598c858b895b94f22 (diff) | |
download | glutin-7ba8fdf3f33b9502007901a2399f915047cac8fc.tar.gz glutin-7ba8fdf3f33b9502007901a2399f915047cac8fc.zip |
Fix creating non-hardware-accelerated contexts
Diffstat (limited to 'src/win32')
-rw-r--r-- | src/win32/init.rs | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/win32/init.rs b/src/win32/init.rs index 6fdafea..260b0ab 100644 --- a/src/win32/init.rs +++ b/src/win32/init.rs @@ -411,13 +411,8 @@ fn enumerate_native_pixel_formats(hdc: winapi::HDC) -> Vec<(PixelFormat, libc::c if (output.dwFlags & winapi::PFD_DRAW_TO_WINDOW) == 0 { continue; } - if (output.dwFlags & winapi::PFD_SUPPORT_OPENGL) == 0 { - continue; - } - if (output.dwFlags & winapi::PFD_GENERIC_ACCELERATED) == 0 && - (output.dwFlags & winapi::PFD_GENERIC_FORMAT) == 0 - { + if (output.dwFlags & winapi::PFD_SUPPORT_OPENGL) == 0 { continue; } @@ -426,6 +421,7 @@ fn enumerate_native_pixel_formats(hdc: winapi::HDC) -> Vec<(PixelFormat, libc::c } result.push((PixelFormat { + hardware_accelerated: (output.dwFlags & winapi::PFD_GENERIC_FORMAT) == 0, red_bits: output.cRedBits, green_bits: output.cGreenBits, blue_bits: output.cBlueBits, @@ -476,6 +472,7 @@ fn enumerate_arb_pixel_formats(extra: &gl::wgl_extra::Wgl, hdc: winapi::HDC) } 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, |