Ejemplo n.º 1
0
 private void ReleaseBuffer()
 {
     if (buffer != SharpVulkan.Buffer.Null)
     {
         context.MemoryAllocator.Unmap(memory);
         context.Release(buffer);
         context.Release(memory);
         buffer = SharpVulkan.Buffer.Null;
     }
 }
Ejemplo n.º 2
0
 public virtual void Dispose()
 {
     if (image != SharpVulkan.Image.Null)
     {
         context.Release(imageView);
         context.Release(image);
         context.Release(memory);
         image = SharpVulkan.Image.Null;
     }
     Disposed = true;
 }
Ejemplo n.º 3
0
 private void DestroySwapchain()
 {
     if (swapchain != SharpVulkan.Swapchain.Null)
     {
         context.WaitForFence(swapchainDestroyFenceValue);
         swapchainDestroyFenceValue = context.NextFenceValue;
         foreach (var i in framebuffers)
         {
             context.Release(i);
         }
         foreach (var i in backbufferViews)
         {
             context.Release(i);
         }
         foreach (var i in acquirementSemaphores)
         {
             context.Release(i);
         }
         context.Release(depthStencilView);
         context.Release(depthStencilBuffer);
         context.Release(depthStencilMemory);
         context.Release(renderPass);
         context.Release(swapchain);
         context.Flush();
         swapchain = SharpVulkan.Swapchain.Null;
     }
 }