diff options
author | tomaka <pierre.krieger1708@gmail.com> | 2014-11-24 20:51:59 +0100 |
---|---|---|
committer | tomaka <pierre.krieger1708@gmail.com> | 2014-11-24 20:51:59 +0100 |
commit | d7a7765638d4638c48e4b76477b32da6be7957b3 (patch) | |
tree | 49cbbce62bec8a6203ab731df87001b32cd7c81d /src/x11/window | |
parent | 9668878f266dc23f8be353d804f7c99fb96767ac (diff) | |
parent | 4c0413bc7cbf83066014ca2334827fd8ccfbcfa7 (diff) | |
download | glutin-d7a7765638d4638c48e4b76477b32da6be7957b3.tar.gz glutin-d7a7765638d4638c48e4b76477b32da6be7957b3.zip |
Merge pull request #134 from tomaka/share-lists
Implement lists sharing
Diffstat (limited to 'src/x11/window')
-rw-r--r-- | src/x11/window/mod.rs | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/x11/window/mod.rs b/src/x11/window/mod.rs index dff33bf..668cd03 100644 --- a/src/x11/window/mod.rs +++ b/src/x11/window/mod.rs @@ -248,11 +248,17 @@ impl Window { }) }); + let share = if let Some(win) = builder.sharing { + win.window.context + } else { + ptr::null() + }; + let context = if extra_functions.CreateContextAttribsARB.is_loaded() { extra_functions.CreateContextAttribsARB(display as *mut ffi::glx_extra::types::Display, - fb_config, ptr::null(), 1, attributes.as_ptr()) + fb_config, share, 1, attributes.as_ptr()) } else { - ffi::glx::CreateContext(display, &mut visual_infos, ptr::null(), 1) + ffi::glx::CreateContext(display, &mut visual_infos, share, 1) }; if context.is_null() { |