mirror of
https://github.com/Ryujinx/Opentk.git
synced 2025-02-02 19:51:10 +00:00
Use Egl.GetDisplay to get a display connection from an EGLNativeDisplayType.
This commit is contained in:
parent
b5928c6dd4
commit
d436bf5e14
|
@ -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)
|
public override IGraphicsContext CreateGLContext(GraphicsMode mode, IWindowInfo window, IGraphicsContext shareContext, bool directRendering, int major, int minor, GraphicsContextFlags flags)
|
||||||
{
|
{
|
||||||
WinWindowInfo win_win = (WinWindowInfo)window;
|
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);
|
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)
|
public override IGraphicsContext CreateGLContext(GraphicsMode mode, IWindowInfo window, IGraphicsContext shareContext, bool directRendering, int major, int minor, GraphicsContextFlags flags)
|
||||||
{
|
{
|
||||||
X11WindowInfo x11_win = (X11WindowInfo)window;
|
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);
|
return new EglContext(mode, egl_win, shareContext, major, minor, flags);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue