UgFrameBuffer

Framebuffer array tied to swapchain images

It

Array of framebuffers covering all swapchain images

struct It {
  VkFramebuffer* handles;
  VkExtent2D extends;
  U32 bufferCount;
};

destroy

Destroy all framebuffers in the array

U0 destroy(UgContext.It& ctx, UgFrameBuffer.It& framebuffers);

Parameters

  • ctx — Vulkan context
  • framebuffers — Framebuffer array to destroy

create

Create one framebuffer per swapchain image

UgFrameBuffer.It create(UgContext.It& ctx, UgSwapchain.It& swapchain, VkRenderPass renderPass);

Parameters

  • ctx — Vulkan context
  • swapchain — Swapchain whose images the framebuffers wrap
  • renderPass — Render pass the framebuffers are compatible with

Returns — Initialized framebuffer array