mirror of
https://github.com/Ryujinx/Opentk.git
synced 2025-01-11 05:15:42 +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,
|
// trying to make the EglContext current on a non-EGL window will do,
|
||||||
// nothing (the EglContext will remain current on the previous EGL window
|
// nothing (the EglContext will remain current on the previous EGL window
|
||||||
// or the window it was constructed on (which may not be EGL)).
|
// or the window it was constructed on (which may not be EGL)).
|
||||||
if (window is EglWindowInfo)
|
if (window != null)
|
||||||
WindowInfo = (EglWindowInfo)window;
|
{
|
||||||
Egl.MakeCurrent(WindowInfo.Display, WindowInfo.Surface, WindowInfo.Surface, HandleAsEGLContext);
|
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
|
public override bool IsCurrent
|
||||||
|
|
Loading…
Reference in a new issue