Skip to content

Commit 3b986a0

Browse files
Merge pull request #1717 from FrancoisBerard/add-flags-in-SwapchainPreferences
Add flags in swapchain preferences
2 parents 57d771a + 616bc6f commit 3b986a0

2 files changed

Lines changed: 2 additions & 0 deletions

File tree

include/vsg/vk/Swapchain.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ namespace vsg
3838
VkSurfaceFormatKHR surfaceFormat = {VK_FORMAT_B8G8R8A8_SRGB, VK_COLOR_SPACE_SRGB_NONLINEAR_KHR};
3939
VkPresentModeKHR presentMode = VK_PRESENT_MODE_FIFO_KHR;
4040
VkImageUsageFlags imageUsage = VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT;
41+
VkSwapchainCreateFlagsKHR flags = 0;
4142
};
4243

4344
/// Swapchain encapsulates vkSwapchainKHR

src/vsg/vk/Swapchain.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,7 @@ Swapchain::Swapchain(PhysicalDevice* physicalDevice, Device* device, Surface* su
183183
VkSwapchainCreateInfoKHR createInfo = {};
184184
createInfo.sType = VK_STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR;
185185
createInfo.surface = *surface;
186+
createInfo.flags = preferences.flags;
186187

187188
createInfo.minImageCount = imageCount;
188189
createInfo.imageFormat = surfaceFormat.format;

0 commit comments

Comments
 (0)