Ejemplo n.º 1
0
        public override void Destroy()
        {
            if (!Wgl.HasExtension(fPbufferDC, "WGL_ARB_pbuffer"))
            {
                // ASSERT
            }

            Wgl.wglDeleteContext(fPbufferGlContext);

            Wgl.wglReleasePbufferDCARB(fPbuffer, fPbufferDC);

            Wgl.wglDestroyPbufferARB(fPbuffer);

            if (fWindow != IntPtr.Zero)
            {
                if (fDeviceContext != IntPtr.Zero)
                {
                    User32.ReleaseDC(fWindow, fDeviceContext);
                    fDeviceContext = IntPtr.Zero;
                }

                User32.DestroyWindow(fWindow);
                fWindow = IntPtr.Zero;
            }

            User32.UnregisterClass("Griffin", Kernel32.CurrentModuleHandle);
        }