Replace C-style struct initialization
This commit is contained in:
parent
e7d855ef50
commit
57de00b759
1 changed files with 12 additions and 17 deletions
|
|
@ -598,23 +598,18 @@ public:
|
||||||
alphaMode = VK_DISPLAY_PLANE_ALPHA_GLOBAL_BIT_KHR;
|
alphaMode = VK_DISPLAY_PLANE_ALPHA_GLOBAL_BIT_KHR;
|
||||||
}
|
}
|
||||||
|
|
||||||
VkDisplaySurfaceCreateInfoKHR surfaceInfo =
|
VkDisplaySurfaceCreateInfoKHR surfaceInfo{};
|
||||||
{
|
surfaceInfo.sType = VK_STRUCTURE_TYPE_DISPLAY_SURFACE_CREATE_INFO_KHR;
|
||||||
.sType = VK_STRUCTURE_TYPE_DISPLAY_SURFACE_CREATE_INFO_KHR,
|
surfaceInfo.pNext = NULL;
|
||||||
.pNext = NULL,
|
surfaceInfo.flags = 0;
|
||||||
.flags = 0,
|
surfaceInfo.displayMode = displayMode;
|
||||||
.displayMode = displayMode,
|
surfaceInfo.planeIndex = bestPlaneIndex;
|
||||||
.planeIndex = bestPlaneIndex,
|
surfaceInfo.planeStackIndex = pPlaneProperties[bestPlaneIndex].currentStackIndex;
|
||||||
.planeStackIndex = pPlaneProperties[bestPlaneIndex].currentStackIndex,
|
surfaceInfo.transform = VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR;
|
||||||
.transform = VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR,
|
surfaceInfo.globalAlpha = 1.0;
|
||||||
.globalAlpha = 1.0,
|
surfaceInfo.alphaMode = alphaMode;
|
||||||
.alphaMode = alphaMode,
|
surfaceInfo.imageExtent.width = width;
|
||||||
.imageExtent =
|
surfaceInfo.imageExtent.height = height;
|
||||||
{
|
|
||||||
width,
|
|
||||||
height,
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
VkResult result = vkCreateDisplayPlaneSurfaceKHR(instance, &surfaceInfo, NULL, &surface);
|
VkResult result = vkCreateDisplayPlaneSurfaceKHR(instance, &surfaceInfo, NULL, &surface);
|
||||||
if(result !=VK_SUCCESS)
|
if(result !=VK_SUCCESS)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue