Exemplo n.º 1
0
 public void Dispose()
 {
     VK.DestroySemaphore(device, imageAvailableSemaphore, alloc);
     VK.DestroySemaphore(device, renderFinishedSemaphore, alloc);
     VK.DestroyCommandPool(device, commandPool, alloc);
     foreach (var fb in swapchainFramebuffers)
     {
         VK.DestroyFramebuffer(device, fb, alloc);
     }
     VK.DestroyPipeline(device, pipeline, alloc);
     VK.DestroyPipelineLayout(device, pipelineLayout, alloc);
     VK.DestroyRenderPass(device, renderPass, alloc);
     foreach (var iv in swapchainImageViews)
     {
         VK.DestroyImageView(device, iv, alloc);
     }
     destroySwapchain(device, swapchain, alloc);
     VK.DestroyDevice(device, alloc);
     destroySurface(instance, surface, alloc);
     VK.DestroyInstance(instance, alloc);
     GLFW.Terminate();
 }