mirror of
https://github.com/Ryujinx/Opentk.git
synced 2025-08-04 08:41:04 +00:00
Egl: Fix context sharing
This commit is contained in:
parent
623cfa7e9d
commit
1652cf0d23
|
@ -53,8 +53,6 @@ namespace OpenTK.Platform.Egl
|
||||||
if (window == null)
|
if (window == null)
|
||||||
throw new ArgumentNullException("window");
|
throw new ArgumentNullException("window");
|
||||||
|
|
||||||
EglContext shared = (EglContext)sharedContext;
|
|
||||||
|
|
||||||
WindowInfo = window;
|
WindowInfo = window;
|
||||||
|
|
||||||
// Select an EGLConfig that matches the desired mode. We cannot use the 'mode'
|
// Select an EGLConfig that matches the desired mode. We cannot use the 'mode'
|
||||||
|
@ -97,7 +95,7 @@ namespace OpenTK.Platform.Egl
|
||||||
window.CreateWindowSurface(config);
|
window.CreateWindowSurface(config);
|
||||||
|
|
||||||
int[] attrib_list = new int[] { Egl.CONTEXT_CLIENT_VERSION, major, Egl.NONE };
|
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,
|
public EglContext(ContextHandle handle, EglWindowInfo window, IGraphicsContext sharedContext,
|
||||||
|
|
Loading…
Reference in a new issue