mirror of
https://github.com/Ryujinx/Opentk.git
synced 2024-12-23 10:55:32 +00:00
Egl: Unset context when calling MakeCurrent(null)
This commit is contained in:
parent
695dcd4d60
commit
623cfa7e9d
|
@ -126,9 +126,16 @@ namespace OpenTK.Platform.Egl
|
|||
// trying to make the EglContext current on a non-EGL window will do,
|
||||
// nothing (the EglContext will remain current on the previous EGL window
|
||||
// or the window it was constructed on (which may not be EGL)).
|
||||
if (window is EglWindowInfo)
|
||||
WindowInfo = (EglWindowInfo)window;
|
||||
Egl.MakeCurrent(WindowInfo.Display, WindowInfo.Surface, WindowInfo.Surface, HandleAsEGLContext);
|
||||
if (window != null)
|
||||
{
|
||||
if (window is EglWindowInfo)
|
||||
WindowInfo = (EglWindowInfo) window;
|
||||
Egl.MakeCurrent(WindowInfo.Display, WindowInfo.Surface, WindowInfo.Surface, HandleAsEGLContext);
|
||||
}
|
||||
else
|
||||
{
|
||||
Egl.MakeCurrent(WindowInfo.Display, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero);
|
||||
}
|
||||
}
|
||||
|
||||
public override bool IsCurrent
|
||||
|
|
Loading…
Reference in a new issue