diff options
Diffstat (limited to 'src/lib.rs')
-rw-r--r-- | src/lib.rs | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -253,6 +253,7 @@ pub struct BuilderAttribs<'a> { color_bits: Option<u8>, alpha_bits: Option<u8>, stereoscopy: bool, + srgb: Option<bool>, } impl BuilderAttribs<'static> { @@ -274,6 +275,7 @@ impl BuilderAttribs<'static> { color_bits: None, alpha_bits: None, stereoscopy: false, + srgb: None, } } } @@ -299,6 +301,7 @@ impl<'a> BuilderAttribs<'a> { color_bits: self.color_bits, alpha_bits: self.alpha_bits, stereoscopy: self.stereoscopy, + srgb: self.srgb, }; (new_attribs, sharing) @@ -332,6 +335,16 @@ impl<'a> BuilderAttribs<'a> { continue; } + if self.multisampling.is_some() && format.multisampling.is_none() { + continue; + } + + if let Some(srgb) = self.srgb { + if srgb != format.srgb { + continue; + } + } + current_software_result = Some((id.clone(), format.clone())); if format.hardware_accelerated { current_result = Some((id, format)); |