diff options
author | Pierre Krieger <pierre.krieger1708@gmail.com> | 2015-09-21 10:55:41 +0200 |
---|---|---|
committer | Pierre Krieger <pierre.krieger1708@gmail.com> | 2015-09-21 12:03:57 +0200 |
commit | 1b836f60406e347967404c52913fb244c9ee424e (patch) | |
tree | 5bed92dbaaff9e341b9656a91432a5ab01381047 /src/api/win32/mod.rs | |
parent | 3054e2ee0236672ae88bd124e60ba49aae701695 (diff) | |
download | glutin-1b836f60406e347967404c52913fb244c9ee424e.tar.gz glutin-1b836f60406e347967404c52913fb244c9ee424e.zip |
Switch WGL and part of win32 to the new system
Diffstat (limited to 'src/api/win32/mod.rs')
-rw-r--r-- | src/api/win32/mod.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/api/win32/mod.rs b/src/api/win32/mod.rs index dea6357..7d7de05 100644 --- a/src/api/win32/mod.rs +++ b/src/api/win32/mod.rs @@ -84,14 +84,14 @@ impl WindowProxy { impl Window { /// See the docs in the crate root file. pub fn new(builder: BuilderAttribs, egl: Option<&Egl>) -> Result<Window, CreationError> { - let (builder, sharing) = builder.extract_non_static(); - - let sharing = sharing.map(|w| match w.context { - Context::Wgl(ref c) => RawContext::Wgl(c.get_hglrc()), - Context::Egl(_) => unimplemented!(), // FIXME: + let opengl = builder.opengl.clone().map_sharing(|sharing| { + match sharing.context { + Context::Wgl(ref c) => RawContext::Wgl(c.get_hglrc()), + Context::Egl(_) => unimplemented!(), // FIXME: + } }); - init::new_window(builder, sharing, egl) + init::new_window(&builder.window, &builder.pf_reqs, &opengl, egl) } /// See the docs in the crate root file. |