Skip to content

finite_render_present_frame

The finite_render_present_frame function attempts to present a rendered image to the swapchain using Vulkan’s presentation queue.

bool finite_render_present_frame(
FiniteRender *render,
FiniteRenderPresentInfo *info,
bool safeExit
);
TypeDescription
FiniteRender *renderThe active FiniteRender instance used for presentation.
FiniteRenderPresentInfo *infoPresentation configuration describing swapchains, semaphores, and image indices.
bool safeExitIf true, the renderer will clean up and exit the application on failure instead of returning false.
FiniteRenderPresentInfo presentInfo = {
.next = NULL,
._waitSemaphores = 1,
.waitSemaphores = &render->renderFinishedSemaphore,
._swapchains = 1,
.swapchains = &render->vk_swapchain,
.imageIndices = &imageIndex,
.results = NULL
};
finite_render_present_frame(render, &presentInfo, true);

To detect presentation errors, provide a valid results array in FiniteRenderPresentInfo.

This function does not perform synchronization beyond what is specified in FiniteRenderPresentInfo