public void DestroySwapStuff() { for (int i = 0; i < mChainBuffers.Length; i++) { if (mChainBuffers[i] != null) { mChainBuffers[i].Dispose(); } } mPipe.Dispose(); mRenderPass.Dispose(); }
private void dispose(bool disposing) { if (disposing && !_isDisposed) { // Not the best idea, but we cant dispose this until RenderQueues using it are done Device.Queues.Graphics.WaitIdle(); // Destroy the Vulkan objects VkPipeline.Dispose(); VkLayout.Dispose(); VkRenderPass.Dispose(); VkFramebuffer.Dispose(); // Decrement the render target ref counts foreach (var rt in _renderTargets) { rt.DecRefCount(); } } _isDisposed = true; }