aboutsummaryrefslogtreecommitdiffstats
path: root/src/x11/window
diff options
context:
space:
mode:
authortomaka <pierre.krieger1708@gmail.com>2014-11-24 20:51:59 +0100
committertomaka <pierre.krieger1708@gmail.com>2014-11-24 20:51:59 +0100
commitd7a7765638d4638c48e4b76477b32da6be7957b3 (patch)
tree49cbbce62bec8a6203ab731df87001b32cd7c81d /src/x11/window
parent9668878f266dc23f8be353d804f7c99fb96767ac (diff)
parent4c0413bc7cbf83066014ca2334827fd8ccfbcfa7 (diff)
downloadglutin-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.rs10
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() {