mirror of
https://github.com/charles-lunarg/vk-bootstrap.git
synced 2024-11-22 15: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) {
|
if (!images) {
|
||||||
return detail::Error{ SwapchainError::failed_get_swapchain_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.image_count = static_cast<uint32_t>(images.value().size());
|
||||||
swapchain.allocation_callbacks = info.allocation_callbacks;
|
swapchain.allocation_callbacks = info.allocation_callbacks;
|
||||||
return swapchain;
|
return swapchain;
|
||||||
|
@ -753,6 +753,8 @@ struct Swapchain {
|
|||||||
uint32_t image_count = 0;
|
uint32_t image_count = 0;
|
||||||
VkFormat image_format = VK_FORMAT_UNDEFINED;
|
VkFormat image_format = VK_FORMAT_UNDEFINED;
|
||||||
VkExtent2D extent = { 0, 0 };
|
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;
|
VkAllocationCallbacks* allocation_callbacks = VK_NULL_HANDLE;
|
||||||
|
|
||||||
// Returns a vector of VkImage handles to the swapchain.
|
// Returns a vector of VkImage handles to the swapchain.
|
||||||
|
Loading…
Reference in New Issue
Block a user