Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //out previously created imageViews are our attachments
- std::array<VkImageView, 2> attachments = { object_picking_colorImageView, object_picking_depthImageView };
- VkFramebufferCreateInfo framebuffer_info{};
- framebuffer_info.sType = VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO;
- framebuffer_info.renderPass = object_picking_pass;
- framebuffer_info.pAttachments = attachments.data();
- framebuffer_info.attachmentCount = static_cast<uint32_t>(attachments.size());
- framebuffer_info.width = swapChainExtent.width;
- framebuffer_info.height = swapChainExtent.height;
- framebuffer_info.layers = 1;
- if (vkCreateFramebuffer(device, &framebuffer_info, nullptr, &object_picking_fb) != VK_SUCCESS) {
- throw std::runtime_error("failed to create framebuffer!");
- }
Add Comment
Please, Sign In to add comment