Exemplo n.º 1
0
        protected virtual void Dispose(bool disposing)
        {
            if (!isDisposed)
            {
                dev.WaitIdle();

                for (int i = 0; i < swapChain.ImageCount; i++)
                {
                    dev.DestroySemaphore(drawComplete[i]);
                    cmds[i].Free();
                }

                swapChain.Dispose();

                vkDestroySurfaceKHR(instance.Handle, hSurf, IntPtr.Zero);

                cmdPool.Dispose();

                if (disposing)
                {
                    dev.Dispose();
                    instance.Dispose();
                }
                else
                {
                    Debug.WriteLine("a VkWindow has not been correctly disposed");
                }

                Glfw3.DestroyWindow(hWin);
                Glfw3.Terminate();


                isDisposed = true;
            }
        }
Exemplo n.º 2
0
        static void Main()
        {
            Glfw3.Init();
            Console.WriteLine($"GLFW3 version: {Glfw3.GetVersion ()}");
            IntPtr win = Glfw3.CreateWindow(100, 100, "test", MonitorHandle.Zero, IntPtr.Zero);

            Glfw3.DestroyWindow(win);
            Glfw3.Terminate();
        }