diff --git a/Source/OpenTK/Platform/Egl/EglWinPlatformFactory.cs b/Source/OpenTK/Platform/Egl/EglWinPlatformFactory.cs index b033a7a1..659b0a15 100644 --- a/Source/OpenTK/Platform/Egl/EglWinPlatformFactory.cs +++ b/Source/OpenTK/Platform/Egl/EglWinPlatformFactory.cs @@ -40,7 +40,7 @@ namespace OpenTK.Platform.Egl public override IGraphicsContext CreateGLContext(GraphicsMode mode, IWindowInfo window, IGraphicsContext shareContext, bool directRendering, int major, int minor, GraphicsContextFlags flags) { WinWindowInfo win_win = (WinWindowInfo)window; - EglWindowInfo egl_win = new OpenTK.Platform.Egl.EglWindowInfo(win_win.WindowHandle, new EGLDisplay(win_win.DeviceContext)); + EglWindowInfo egl_win = new OpenTK.Platform.Egl.EglWindowInfo(win_win.WindowHandle, Egl.GetDisplay(new EGLNativeDisplayType(win_win.DeviceContext))); return new EglContext(mode, egl_win, shareContext, major, minor, flags); } diff --git a/Source/OpenTK/Platform/Egl/EglX11PlatformFactory.cs b/Source/OpenTK/Platform/Egl/EglX11PlatformFactory.cs index b70be4a0..c6578151 100644 --- a/Source/OpenTK/Platform/Egl/EglX11PlatformFactory.cs +++ b/Source/OpenTK/Platform/Egl/EglX11PlatformFactory.cs @@ -38,7 +38,7 @@ namespace OpenTK.Platform.Egl public override IGraphicsContext CreateGLContext(GraphicsMode mode, IWindowInfo window, IGraphicsContext shareContext, bool directRendering, int major, int minor, GraphicsContextFlags flags) { X11WindowInfo x11_win = (X11WindowInfo)window; - EglWindowInfo egl_win = new OpenTK.Platform.Egl.EglWindowInfo(x11_win.WindowHandle, new EGLDisplay(x11_win.Display)); + EglWindowInfo egl_win = new OpenTK.Platform.Egl.EglWindowInfo(x11_win.WindowHandle, Egl.GetDisplay(new EGLNativeDisplayType(x11_win.Display))); return new EglContext(mode, egl_win, shareContext, major, minor, flags); } }