internal void OnGraphicsSurfaceSizeChanged(object?sender, PropertyChangedEventArgs <Vector2> eventArgs) { if (_vulkanFramebuffer.IsCreated) { var vulkanFramebuffer = _vulkanFramebuffer.Value; if (vulkanFramebuffer != VK_NULL_HANDLE) { vkDestroyFramebuffer(VulkanGraphicsDevice.VulkanDevice, vulkanFramebuffer, pAllocator: null); } _vulkanFramebuffer.Reset(CreateVulkanFramebuffer); } if (_vulkanSwapChainImageView.IsCreated) { var vulkanSwapChainImageView = _vulkanSwapChainImageView.Value; if (vulkanSwapChainImageView != VK_NULL_HANDLE) { vkDestroyImageView(VulkanGraphicsDevice.VulkanDevice, vulkanSwapChainImageView, pAllocator: null); } _vulkanSwapChainImageView.Reset(CreateVulkanSwapChainImageView); } }
internal void OnGraphicsSurfaceSizeChanged(object?sender, PropertyChangedEventArgs <Vector2> eventArgs) { if (_d3d12RenderTargetView.IsCreated) { ReleaseIfNotNull(_d3d12RenderTargetResource.Value); _d3d12RenderTargetResource.Reset(CreateD3D12RenderTargetResource); } }