From 3c889636ad53551b7ffb1860d357188e1aa31a92 Mon Sep 17 00:00:00 2001 From: Pierre Krieger Date: Sun, 21 Jun 2015 13:07:24 +0200 Subject: [PATCH] Makes sure that the pf has the same multisampling settings as the requirements --- src/lib.rs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 068b9b84..a6464360 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -398,8 +398,15 @@ impl<'a> BuilderAttribs<'a> { continue; } - if self.multisampling.is_some() && format.multisampling.is_none() { - continue; + if let Some(req_ms) = self.multisampling { + match format.multisampling { + Some(val) if val >= req_ms => (), + _ => continue + } + } else { + if format.multisampling.is_some() { + continue; + } } if let Some(srgb) = self.srgb {