19 std::vector<VkImageView> vkImageViews(
_attachments.size());
22 [](
const API::ImageView* imageView){
return static_cast<VkImageView
>(*imageView); }
26 const VkFramebufferCreateInfo createInfo{
27 VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO,
30 static_cast<VkRenderPass
>(*_renderPass),
31 static_cast<uint32_t
>(vkImageViews.size()),
39 VkFramebuffer vkFramebuffer{VK_NULL_HANDLE};
40 VkResult result = vkCreateFramebuffer(static_cast<VkDevice>(
_device), &createInfo,
nullptr, &vkFramebuffer);
43 *returnResult = result;
46 if (result != VK_SUCCESS) {
56 std::unique_ptr<API::Framebuffer> framebuffer = std::make_unique<API::Framebuffer>();
57 return build(*framebuffer, returnResult) ? std::move(framebuffer) :
nullptr;
bool build(API::Framebuffer &framebuffer, VkResult *returnResult=nullptr)
std::vector< const API::ImageView * > _attachments
Framebuffer(const API::Device &device)
const API::Device & _device