DestroyContext() public static method

public static DestroyContext ( IntPtr dpy, ContextHandle context ) : void
dpy System.IntPtr
context ContextHandle
return void
コード例 #1
0
 private void Dispose(bool manuallyCalled)
 {
     if (!IsDisposed)
     {
         if (manuallyCalled)
         {
             IntPtr display = Display;
             if (IsCurrent)
             {
                 using (new XLock(display))
                 {
                     Glx.MakeCurrent(display, IntPtr.Zero, IntPtr.Zero);
                 }
             }
             using (new XLock(display))
             {
                 Glx.DestroyContext(display, Handle);
             }
         }
     }
     else
     {
         Debug.Print("[Warning] {0} leaked.", this.GetType().Name);
     }
     IsDisposed = true;
 }
コード例 #2
0
ファイル: X11GLContext.cs プロジェクト: conankzhang/fez
 private void Dispose(bool manuallyCalled)
 {
     if (!this.IsDisposed && manuallyCalled)
     {
         IntPtr display = this.Display;
         if (this.IsCurrent)
         {
             using (new XLock(display))
                 Glx.MakeCurrent(display, IntPtr.Zero, IntPtr.Zero);
         }
         using (new XLock(display))
             Glx.DestroyContext(display, this.Handle);
     }
     this.IsDisposed = true;
 }
コード例 #3
0
        private void Dispose(bool manuallyCalled)
        {
            if (!IsDisposed)
            {
                if (manuallyCalled)
                {
                    if (GraphicsContext.CurrentContext != null &&
                        ((IGraphicsContextInternal)GraphicsContext.CurrentContext).Context == Handle)
                    {
                        GraphicsContext.CurrentContext.MakeCurrent(null);
                    }

                    Glx.DestroyContext(currentWindow.Display, Handle);
                }
                else
                {
                    Debug.Print("[Warning] {0} leaked.", this.GetType().Name);
                }
                IsDisposed = true;
            }
        }
コード例 #4
0
ファイル: Glx.cs プロジェクト: conankzhang/fez
 public static void DestroyContext(IntPtr dpy, ContextHandle context)
 {
     Glx.DestroyContext(dpy, context.Handle);
 }