Skip to content

Instantly share code, notes, and snippets.

@sjhalayka
Created May 16, 2023 16:51
Show Gist options
  • Save sjhalayka/bcf49660d2379532e398a4fa3e3b07fd to your computer and use it in GitHub Desktop.
Save sjhalayka/bcf49660d2379532e398a4fa3e3b07fd to your computer and use it in GitHub Desktop.
render function
virtual void render()
{
if (!prepared)
return;
VulkanExampleBase::prepareFrame();
submitInfo.commandBufferCount = 1;
submitInfo.pCommandBuffers = &drawCmdBuffers[currentBuffer];
VK_CHECK_RESULT(vkQueueSubmit(queue, 1, &submitInfo, fence));
VulkanExampleBase::submitFrame();
vkWaitForFences(device, 1, &fence, VK_TRUE, UINT64_MAX);
if(do_screenshot)
{
screenshot(width * 6, height * 6, "v_rt_reflect.png");
do_screenshot = false;
}
vkResetFences(device, 1, &fence);
if (!paused || camera.updated)
updateUniformBuffers();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment