private void ReleaseBuffer() { if (buffer != SharpVulkan.Buffer.Null) { context.MemoryAllocator.Unmap(memory); context.Release(buffer); context.Release(memory); buffer = SharpVulkan.Buffer.Null; } }
public virtual void Dispose() { if (image != SharpVulkan.Image.Null) { context.Release(imageView); context.Release(image); context.Release(memory); image = SharpVulkan.Image.Null; } Disposed = true; }
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; } }