mirror of
https://github.com/charles-lunarg/vk-bootstrap.git
synced 2024-11-22 07:24:34 +00:00
SwapchainBuilder: expose present_mode and requested_min_image_count in the resulting Swapchain
This commit is contained in:
parent
8f39b12431
commit
74cac40817
@ -1848,6 +1848,8 @@ detail::Result<Swapchain> SwapchainBuilder::build() const {
|
||||
if (!images) {
|
||||
return detail::Error{ SwapchainError::failed_get_swapchain_images };
|
||||
}
|
||||
swapchain.requested_min_image_count = image_count;
|
||||
swapchain.present_mode = present_mode;
|
||||
swapchain.image_count = static_cast<uint32_t>(images.value().size());
|
||||
swapchain.allocation_callbacks = info.allocation_callbacks;
|
||||
return swapchain;
|
||||
|
@ -753,6 +753,8 @@ struct Swapchain {
|
||||
uint32_t image_count = 0;
|
||||
VkFormat image_format = VK_FORMAT_UNDEFINED;
|
||||
VkExtent2D extent = { 0, 0 };
|
||||
uint32_t requested_min_image_count = 0; // The value of minImageCount actually used when creating the swapchain; note that the presentation engine is always free to create more images than that.
|
||||
VkPresentModeKHR present_mode = VK_PRESENT_MODE_IMMEDIATE_KHR; // The present mode actually used when creating the swapchain.
|
||||
VkAllocationCallbacks* allocation_callbacks = VK_NULL_HANDLE;
|
||||
|
||||
// Returns a vector of VkImage handles to the swapchain.
|
||||
|
Loading…
Reference in New Issue
Block a user