private DestroyContext ( EGLDisplay dpy, EGLContext ctx ) : bool | ||
dpy | EGLDisplay | |
ctx | EGLContext | |
return | bool |
// Todo: cross-reference the specs. What should happen if the context is destroyed from a different // thread? protected override void Dispose(bool manual) { if (!IsDisposed) { if (manual) { Egl.MakeCurrent(WindowInfo.Display, WindowInfo.Surface, WindowInfo.Surface, IntPtr.Zero); Egl.DestroyContext(WindowInfo.Display, HandleAsEGLContext); } IsDisposed = true; } }
private void Dispose(bool manual) { if (this.IsDisposed) { return; } if (manual) { Egl.MakeCurrent(this.WindowInfo.Display, this.WindowInfo.Surface, this.WindowInfo.Surface, IntPtr.Zero); Egl.DestroyContext(this.WindowInfo.Display, this.HandleAsEGLContext); } this.IsDisposed = true; }
// Todo: cross-reference the specs. What should happen if the context is destroyed from a different // thread? void Dispose(bool manual) { if (!IsDisposed) { if (manual) { Egl.MakeCurrent(WindowInfo.Display, WindowInfo.Surface, WindowInfo.Surface, IntPtr.Zero); Egl.DestroyContext(WindowInfo.Display, HandleAsEGLContext); } else { Debug.Print("[Warning] {0}:{1} was not disposed.", this.GetType().Name, HandleAsEGLContext); } IsDisposed = true; } }