DestroyContext() private method

private DestroyContext ( EGLDisplay dpy, EGLContext ctx ) : bool
dpy EGLDisplay
ctx EGLContext
return bool
示例#1
0
 // 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;
     }
 }
示例#2
0
 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;
 }
示例#3
0
 // 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;
     }
 }