Egl: Unset context when calling MakeCurrent(null)

This commit is contained in:
Virgile Bello 2016-05-20 12:53:21 +09:00
parent 695dcd4d60
commit 623cfa7e9d

View file

@ -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