MCPcopy Create free account
hub / github.com/Overv/VulkanTutorial / chooseSwapSurfaceFormat

Method chooseSwapSurfaceFormat

code/25_sampler.cpp:1262–1270  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1260 }
1261
1262 VkSurfaceFormatKHR chooseSwapSurfaceFormat(const std::vector<VkSurfaceFormatKHR>& availableFormats) {
1263 for (const auto& availableFormat : availableFormats) {
1264 if (availableFormat.format == VK_FORMAT_B8G8R8A8_SRGB && availableFormat.colorSpace == VK_COLOR_SPACE_SRGB_NONLINEAR_KHR) {
1265 return availableFormat;
1266 }
1267 }
1268
1269 return availableFormats[0];
1270 }
1271
1272 VkPresentModeKHR chooseSwapPresentMode(const std::vector<VkPresentModeKHR>& availablePresentModes) {
1273 for (const auto& availablePresentMode : availablePresentModes) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected