Updated the default image formats for the swapchain

Used to use UNORM, now uses SRGB.
This commit is contained in:
Charles Giessen 2020-05-09 17:22:45 -06:00
parent 8c6f900ce8
commit c79482c0b1

View File

@ -1380,8 +1380,8 @@ SwapchainBuilder& SwapchainBuilder::set_allocation_callbacks (VkAllocationCallba
return *this; return *this;
} }
void SwapchainBuilder::add_desired_formats (std::vector<VkSurfaceFormatKHR>& formats) const { void SwapchainBuilder::add_desired_formats (std::vector<VkSurfaceFormatKHR>& formats) const {
formats.push_back ({ VK_FORMAT_R8G8B8A8_UNORM, VK_COLOR_SPACE_SRGB_NONLINEAR_KHR }); formats.push_back ({ VK_FORMAT_B8G8R8A8_SRGB, VK_COLOR_SPACE_SRGB_NONLINEAR_KHR });
formats.push_back ({ VK_FORMAT_B8G8R8A8_UNORM, VK_COLOR_SPACE_SRGB_NONLINEAR_KHR }); formats.push_back ({ VK_FORMAT_R8G8B8A8_SRGB, VK_COLOR_SPACE_SRGB_NONLINEAR_KHR });
} }
void SwapchainBuilder::add_desired_present_modes (std::vector<VkPresentModeKHR>& modes) const { void SwapchainBuilder::add_desired_present_modes (std::vector<VkPresentModeKHR>& modes) const {
modes.push_back (VK_PRESENT_MODE_MAILBOX_KHR); modes.push_back (VK_PRESENT_MODE_MAILBOX_KHR);