59 vk::SwapchainCreateInfoKHR createInfo;
61 createInfo.minImageCount = imageCount;
62 createInfo.imageFormat = swapformat.format;
63 createInfo.imageColorSpace = swapformat.colorSpace;
64 createInfo.imageExtent = swapextent;
65 createInfo.imageArrayLayers = 1;
66 createInfo.imageUsage = vk::ImageUsageFlagBits::eColorAttachment;
68 uint32_t queueFamilyIndices[] = {
74 createInfo.imageSharingMode = vk::SharingMode::eExclusive;
77 createInfo.imageSharingMode = vk::SharingMode::eConcurrent;
78 createInfo.queueFamilyIndexCount = 2;
79 createInfo.pQueueFamilyIndices = queueFamilyIndices;
83 createInfo.compositeAlpha = vk::CompositeAlphaFlagBitsKHR::eOpaque;
84 createInfo.presentMode = presentMode;
85 createInfo.clipped = VK_TRUE;
86 createInfo.oldSwapchain =
nullptr;
93 format = swapformat.format;
103 for (
const vk::Image& image :
images) {
104 vk::ImageSubresourceRange range(vk::ImageAspectFlagBits::eColor, 0, 1, 0, 1);
105 vk::ImageViewCreateInfo createInfo(vk::ImageViewCreateFlags(), image, vk::ImageViewType::e2D,
format,
106 vk::ComponentMapping(), range);