improved server
This commit is contained in:
@@ -74,8 +74,8 @@ void IVideo_SwapchainInit()
|
||||
vkGetPhysicalDeviceSurfaceCapabilitiesKHR(g_vkPhysicalDevice, g_surface, &surfaceCapatibilities);
|
||||
|
||||
const VkFormat preferedSurfaceFormats[] = {
|
||||
VK_FORMAT_R8G8B8A8_UNORM,
|
||||
VK_FORMAT_B8G8R8A8_UNORM,
|
||||
VK_FORMAT_R8G8B8A8_UNORM,
|
||||
};
|
||||
|
||||
uint32_t numSurfaceFormats = 0;
|
||||
@@ -88,9 +88,14 @@ void IVideo_SwapchainInit()
|
||||
{
|
||||
for (int i = 0; i < sizeof(preferedSurfaceFormats)/sizeof(VkFormat); i++)
|
||||
{
|
||||
selectedFormat = surfaceFormats[i];
|
||||
if (format.format == preferedSurfaceFormats[i])
|
||||
{
|
||||
selectedFormat = format;
|
||||
goto formatPicked;
|
||||
}
|
||||
}
|
||||
}
|
||||
formatPicked:
|
||||
|
||||
uint32_t numSurfacePresentModes = 0;
|
||||
vkGetPhysicalDeviceSurfacePresentModesKHR(g_vkPhysicalDevice, g_surface, &numSurfacePresentModes, NULL);
|
||||
|
||||
Reference in New Issue
Block a user