diff options
author | Felix Kaaman <trundmatu@gmail.com> | 2015-04-30 15:41:21 +0200 |
---|---|---|
committer | Felix Kaaman <trundmatu@gmail.com> | 2015-04-30 15:53:27 +0200 |
commit | 80c49856b24d6ddd848226ff0e7720915e554ee6 (patch) | |
tree | 91859154962312597279e0a27952d976c8ceec28 /src/lib.rs | |
parent | 735df1c7d83d51c26ab852c843935341ae84e281 (diff) | |
download | glutin-80c49856b24d6ddd848226ff0e7720915e554ee6.tar.gz glutin-80c49856b24d6ddd848226ff0e7720915e554ee6.zip |
Add pixelformat for cocoa and remove individual color components
Diffstat (limited to 'src/lib.rs')
-rw-r--r-- | src/lib.rs | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -211,9 +211,7 @@ pub enum CursorState { #[derive(Debug, Clone)] pub struct PixelFormat { pub hardware_accelerated: bool, - pub red_bits: u8, - pub green_bits: u8, - pub blue_bits: u8, + pub color_bits: u8, pub alpha_bits: u8, pub depth_bits: u8, pub stencil_bits: u8, @@ -306,7 +304,7 @@ impl<'a> BuilderAttribs<'a> { // TODO: do this more properly for (id, format) in iter { - if format.red_bits + format.green_bits + format.blue_bits < self.color_bits.unwrap_or(0) { + if format.color_bits < self.color_bits.unwrap_or(0) { continue; } |