Use Egl.GetDisplay to get a display connection from an EGLNativeDisplayType.
This commit is contained in:
parent
e110c32ff8
commit
ede71114f7
2 changed files with 2 additions and 2 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue