diff options
author | Pierre Krieger <pierre.krieger1708@gmail.com> | 2015-09-21 09:33:41 +0200 |
---|---|---|
committer | Pierre Krieger <pierre.krieger1708@gmail.com> | 2015-09-21 12:03:56 +0200 |
commit | 58b3bfb4fba22ecdb6f846f88f8a74e13ecae8ec (patch) | |
tree | 3c39af2f6ac64aa44dc2555a9302f24115697e56 /src/api/cocoa | |
parent | 48fe9b26442662517b1590cb98ab81d79b059953 (diff) | |
download | glutin-58b3bfb4fba22ecdb6f846f88f8a74e13ecae8ec.tar.gz glutin-58b3bfb4fba22ecdb6f846f88f8a74e13ecae8ec.zip |
Extract PixelFormatRequirements from BuilderAttribs
Diffstat (limited to 'src/api/cocoa')
-rw-r--r-- | src/api/cocoa/mod.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/api/cocoa/mod.rs b/src/api/cocoa/mod.rs index e3feda2..a682489 100644 --- a/src/api/cocoa/mod.rs +++ b/src/api/cocoa/mod.rs @@ -471,16 +471,16 @@ impl Window { // full color size and hope for the best. Another hiccup is that // `NSOpenGLPFAColorSize` also includes `NSOpenGLPFAAlphaSize`, // so we have to account for that as well. - let alpha_depth = builder.alpha_bits.unwrap_or(8); - let color_depth = builder.color_bits.unwrap_or(24) + alpha_depth; + let alpha_depth = builder.pf_reqs.alpha_bits.unwrap_or(8); + let color_depth = builder.pf_reqs.color_bits.unwrap_or(24) + alpha_depth; let mut attributes = vec![ NSOpenGLPFADoubleBuffer as u32, NSOpenGLPFAClosestPolicy as u32, NSOpenGLPFAColorSize as u32, color_depth as u32, NSOpenGLPFAAlphaSize as u32, alpha_depth as u32, - NSOpenGLPFADepthSize as u32, builder.depth_bits.unwrap_or(24) as u32, - NSOpenGLPFAStencilSize as u32, builder.stencil_bits.unwrap_or(8) as u32, + NSOpenGLPFADepthSize as u32, builder.pf_reqs.depth_bits.unwrap_or(24) as u32, + NSOpenGLPFAStencilSize as u32, builder.pf_reqs.stencil_bits.unwrap_or(8) as u32, NSOpenGLPFAOpenGLProfile as u32, profile, ]; @@ -491,7 +491,7 @@ impl Window { attributes.push(NSOpenGLPFAColorFloat as u32); } - builder.multisampling.map(|samples| { + builder.pf_reqs.multisampling.map(|samples| { attributes.push(NSOpenGLPFAMultisample as u32); attributes.push(NSOpenGLPFASampleBuffers as u32); attributes.push(1); attributes.push(NSOpenGLPFASamples as u32); attributes.push(samples as u32); |