mirror of
https://github.com/rust-windowing/winit.git
synced 2026-09-02 06:40:06 -04:00
Merge pull request #495 from tomaka/fix-multisampling
Makes sure that the pixel format has the same multisampling settings as the requirements
This commit is contained in:
@@ -398,9 +398,16 @@ impl<'a> BuilderAttribs<'a> {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if self.multisampling.is_some() && format.multisampling.is_none() {
|
if let Some(req_ms) = self.multisampling {
|
||||||
|
match format.multisampling {
|
||||||
|
Some(val) if val >= req_ms => (),
|
||||||
|
_ => continue
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if format.multisampling.is_some() {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if let Some(srgb) = self.srgb {
|
if let Some(srgb) = self.srgb {
|
||||||
if srgb != format.srgb {
|
if srgb != format.srgb {
|
||||||
|
|||||||
Reference in New Issue
Block a user