Skip to content

finite_render_create_framebuffers

The finite_render_create_framebuffers function creates an array of Vulkan framebuffers for a given FiniteRender context based on the provided framebuffer info.

void finite_render_create_framebuffers(
FiniteRender *render,
FiniteRenderFramebufferInfo *info
);
TypeDescription
FiniteRender *renderThe Vulkan rendering context. Must be valid and have a created render pass.
FiniteRenderFramebufferInfo *infoContains attachment views, width, height, and layer information for the framebuffers.
FiniteRenderFramebufferInfo fb_info = {
._attachments = 1,
.attachments = {VK_NULL_HANDLE},
.width = 800,
.height = 600,
.layers = 1,
.next = NULL,
.flags = 0
};
finite_render_create_framebuffers(render, &fb_info);

If an attachment in info->attachments is VK_NULL_HANDLE, the current render->vk_view[i] is used automatically.

The program will exit if vkCreateFramebuffer fails for any framebuffer.

render must be fully initialized, including FiniteRender.vk_device and a valid FiniteRender.vk_renderPass.

The function allocates memory internally for VkFramebufferCreateInfo and stores the resulting VkFramebuffers in render->vk_frameBufs. Do not free manually.