Initializers for attachment descriptions
This commit is contained in:
parent
81af6fe108
commit
8ee2687ced
2 changed files with 5 additions and 2 deletions
|
|
@ -1386,7 +1386,9 @@ void VulkanExampleBase::setupFrameBuffer()
|
|||
|
||||
void VulkanExampleBase::setupRenderPass()
|
||||
{
|
||||
VkAttachmentDescription attachments[2];
|
||||
VkAttachmentDescription attachments[2] = {};
|
||||
|
||||
// Color attachment
|
||||
attachments[0].format = colorformat;
|
||||
attachments[0].samples = VK_SAMPLE_COUNT_1_BIT;
|
||||
attachments[0].loadOp = VK_ATTACHMENT_LOAD_OP_CLEAR;
|
||||
|
|
@ -1396,6 +1398,7 @@ void VulkanExampleBase::setupRenderPass()
|
|||
attachments[0].initialLayout = VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL;
|
||||
attachments[0].finalLayout = VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL;
|
||||
|
||||
// Depth attachment
|
||||
attachments[1].format = depthFormat;
|
||||
attachments[1].samples = VK_SAMPLE_COUNT_1_BIT;
|
||||
attachments[1].loadOp = VK_ATTACHMENT_LOAD_OP_CLEAR;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue