Total mess. The instructions significantly fall apart at this point and I'll have to go reverse engineer the working version from the course's git repo.

This commit is contained in:
Zed A. Shaw 2026-02-06 11:55:32 -05:00
parent 7ae6a63295
commit b3cdf37045
8 changed files with 185 additions and 196 deletions

View file

@ -143,6 +143,26 @@ VkRenderingAttachmentInfo vkinit::attachment_info(
}
VkRenderingAttachmentInfo vkinit::depth_attachment_info(
VkImageView view, VkImageLayout layout /*= VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL*/)
{
VkRenderingAttachmentInfo depthAttachment{
.sType = VK_STRUCTURE_TYPE_RENDERING_ATTACHMENT_INFO,
.pNext = nullptr,
.imageView = view,
.imageLayout = layout,
.loadOp = VK_ATTACHMENT_LOAD_OP_CLEAR,
.storeOp = VK_ATTACHMENT_STORE_OP_STORE,
};
depthAttachment.clearValue.depthStencil.depth = 0.0f;
return depthAttachment;
}
VkRenderingInfo vkinit::rendering_info(VkExtent2D renderExtent, VkRenderingAttachmentInfo* colorAttachment,
VkRenderingAttachmentInfo* depthAttachment)
{