From 1652cf0d237b7db6c088ee3be5029ddf17ed1afe Mon Sep 17 00:00:00 2001 From: Virgile Bello Date: Fri, 20 May 2016 17:22:25 +0900 Subject: [PATCH] Egl: Fix context sharing --- Source/OpenTK/Platform/Egl/EglContext.cs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Source/OpenTK/Platform/Egl/EglContext.cs b/Source/OpenTK/Platform/Egl/EglContext.cs index 9312ad8..c61ec77 100644 --- a/Source/OpenTK/Platform/Egl/EglContext.cs +++ b/Source/OpenTK/Platform/Egl/EglContext.cs @@ -53,8 +53,6 @@ namespace OpenTK.Platform.Egl if (window == null) throw new ArgumentNullException("window"); - EglContext shared = (EglContext)sharedContext; - WindowInfo = window; // Select an EGLConfig that matches the desired mode. We cannot use the 'mode' @@ -97,7 +95,7 @@ namespace OpenTK.Platform.Egl window.CreateWindowSurface(config); int[] attrib_list = new int[] { Egl.CONTEXT_CLIENT_VERSION, major, Egl.NONE }; - HandleAsEGLContext = Egl.CreateContext(window.Display, config, shared != null ? shared.HandleAsEGLContext : IntPtr.Zero, attrib_list); + HandleAsEGLContext = Egl.CreateContext(window.Display, config, sharedContext != null ? (sharedContext as IGraphicsContextInternal).Context.Handle : IntPtr.Zero, attrib_list); } public EglContext(ContextHandle handle, EglWindowInfo window, IGraphicsContext sharedContext, -- 2.7.4