public static VkResult Create(SoftwareDevice device, VkSwapchainCreateInfoKHR createInfo, out VkSwapchainKHR swapChain) { SoftwareSwapchain retVal = new SoftwareSwapchain(device, createInfo); retVal.m_Images.Clear(); while (retVal.m_Images.Count < createInfo.minImageCount) { VkResult resultCode; SoftwareImage image = SoftwareImage.CreateSwapchainImage(device, createInfo, out resultCode); if (resultCode != VkResult.VK_SUCCESS) { swapChain = default(VkSwapchainKHR); return(resultCode); } retVal.m_Images.Add(image); } swapChain = retVal; return(VkResult.VK_SUCCESS); }
public override VkResult CreateSwapchain(VkSwapchainCreateInfoKHR createInfo, out VkSwapchainKHR swapChain) { return(SoftwareSwapchain.Create(this, createInfo, out swapChain)); }