aboutsummaryrefslogtreecommitdiffstats
path: root/src/win32
diff options
context:
space:
mode:
authortomaka <pierre.krieger1708@gmail.com>2015-04-03 13:54:20 +0200
committertomaka <pierre.krieger1708@gmail.com>2015-04-03 13:54:20 +0200
commit424cc5ea4909e9e57a1d14b6ad6a397e992ab6fb (patch)
tree57cb8e314f556af0713e3a8d53351935860dd0d2 /src/win32
parent52fa3c83827f0ba084280d24171c2c60299c6cef (diff)
parent4d81cc2df1e1a4867a8c874a39365f90b26e2cdb (diff)
downloadglutin-424cc5ea4909e9e57a1d14b6ad6a397e992ab6fb.tar.gz
glutin-424cc5ea4909e9e57a1d14b6ad6a397e992ab6fb.zip
Merge pull request #347 from tomaka/win32-pixel-format-details
Fix missing parameter for pixel formats infos on win32
Diffstat (limited to 'src/win32')
-rw-r--r--src/win32/init.rs17
1 files changed, 15 insertions, 2 deletions
diff --git a/src/win32/init.rs b/src/win32/init.rs
index 5cf4021..d83c90f 100644
--- a/src/win32/init.rs
+++ b/src/win32/init.rs
@@ -490,8 +490,21 @@ unsafe fn enumerate_arb_pixel_formats(extra: &gl::wgl_extra::Wgl, hdc: &WindowWr
stencil_bits: get_info(index, gl::wgl_extra::STENCIL_BITS_ARB) as u8,
stereoscopy: get_info(index, gl::wgl_extra::STEREO_ARB) != 0,
double_buffer: get_info(index, gl::wgl_extra::DOUBLE_BUFFER_ARB) != 0,
- multisampling: None, // FIXME:
- srgb: false, // FIXME:
+ multisampling: {
+ if is_extension_supported(extra, hdc, "WGL_ARB_multisample") {
+ match get_info(index, gl::wgl_extra::SAMPLES_ARB) {
+ 0 => None,
+ a => Some(a as u16),
+ }
+ } else {
+ None
+ }
+ },
+ srgb: if is_extension_supported(extra, hdc, "WGL_ARB_framebuffer_sRGB") {
+ get_info(index, gl::wgl_extra::FRAMEBUFFER_SRGB_CAPABLE_ARB) != 0
+ } else {
+ false
+ },
}, index as libc::c_int));
}