diff options
author | Pierre Krieger <pierre.krieger1708@gmail.com> | 2015-09-20 09:29:22 +0200 |
---|---|---|
committer | Pierre Krieger <pierre.krieger1708@gmail.com> | 2015-09-21 12:03:55 +0200 |
commit | c244f8c033f100a6e0f3e0b2b408f6ddc1006d47 (patch) | |
tree | 786cb96254b0fe69646700fc4845218c5703ffac /src/api/cocoa | |
parent | f51ace4c7885fa25c146c24181c4d87f5632de3e (diff) | |
download | glutin-c244f8c033f100a6e0f3e0b2b408f6ddc1006d47.tar.gz glutin-c244f8c033f100a6e0f3e0b2b408f6ddc1006d47.zip |
Extract GlAttributes from BuilderAttribs
Diffstat (limited to 'src/api/cocoa')
-rw-r--r-- | src/api/cocoa/mod.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/api/cocoa/mod.rs b/src/api/cocoa/mod.rs index 259f847..e259f39 100644 --- a/src/api/cocoa/mod.rs +++ b/src/api/cocoa/mod.rs @@ -267,11 +267,11 @@ impl<'a> Iterator for WaitEventsIterator<'a> { impl Window { #[cfg(feature = "window")] pub fn new(builder: BuilderAttribs) -> Result<Window, CreationError> { - if builder.sharing.is_some() { + if builder.opengl.sharing.is_some() { unimplemented!() } - match builder.gl_robustness { + match builder.opengl.robustness { Robustness::RobustNoResetNotification | Robustness::RobustLoseContextOnReset => { return Err(CreationError::RobustnessNotSupported); }, @@ -438,7 +438,7 @@ impl Window { } fn create_context(view: id, builder: &BuilderAttribs) -> Result<(IdRef, PixelFormat), CreationError> { - let profile = match (builder.gl_version, builder.gl_version.to_gl_version(), builder.gl_profile) { + let profile = match (builder.opengl.version, builder.opengl.version.to_gl_version(), builder.opengl.profile) { // Note: we are not using ranges because of a rust bug that should be fixed here: // https://github.com/rust-lang/rust/pull/27050 @@ -540,7 +540,7 @@ impl Window { }; cxt.setView_(view); - let value = if builder.vsync { 1 } else { 0 }; + let value = if builder.opengl.vsync { 1 } else { 0 }; cxt.setValues_forParameter_(&value, NSOpenGLContextParameter::NSOpenGLCPSwapInterval); CGLEnable(cxt.CGLContextObj(), kCGLCECrashOnRemovedFunctions); |