aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortomaka <pierre.krieger1708@gmail.com>2015-06-23 16:46:49 +0200
committertomaka <pierre.krieger1708@gmail.com>2015-06-23 16:46:49 +0200
commit717ea3d5ba655a3ec18f834f5e27152e81c7a8b5 (patch)
tree15cf7924fd91146ed91db0100a979c2492400a9e
parent8f66d58287cbc786952e14b49243dad5727af1dc (diff)
parent3c889636ad53551b7ffb1860d357188e1aa31a92 (diff)
downloadglutin-717ea3d5ba655a3ec18f834f5e27152e81c7a8b5.tar.gz
glutin-717ea3d5ba655a3ec18f834f5e27152e81c7a8b5.zip
Merge pull request #495 from tomaka/fix-multisampling
Makes sure that the pixel format has the same multisampling settings as the requirements
-rw-r--r--src/lib.rs11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 068b9b8..a646436 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 {