diff options
author | Pierre Krieger <pierre.krieger1708@gmail.com> | 2015-06-21 13:07:24 +0200 |
---|---|---|
committer | Pierre Krieger <pierre.krieger1708@gmail.com> | 2015-06-21 13:07:24 +0200 |
commit | 3c889636ad53551b7ffb1860d357188e1aa31a92 (patch) | |
tree | bacf5c9c1591c3171eba61aed3bf18fb8f8a4079 | |
parent | e6dca4f7d1d8568eae3257b006a0d24b5d6f34fd (diff) | |
download | glutin-3c889636ad53551b7ffb1860d357188e1aa31a92.tar.gz glutin-3c889636ad53551b7ffb1860d357188e1aa31a92.zip |
Makes sure that the pf has the same multisampling settings as the requirements
-rw-r--r-- | src/lib.rs | 11 |
1 files changed, 9 insertions, 2 deletions
@@ -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 { |