diff --git a/samples/01_triangle/triangle.cpp b/samples/01_triangle/triangle.cpp index 696e284..964323d 100644 --- a/samples/01_triangle/triangle.cpp +++ b/samples/01_triangle/triangle.cpp @@ -129,13 +129,13 @@ main(int, char **) viewport.width = Cast(swapchain.m_Extent.width); viewport.height = -Cast(swapchain.m_Extent.height); scissor.extent = swapchain.m_Extent; - break; + continue; // Image acquire has failed. We move to the next frame. default: ERROR("Waiting for swapchain image {} failed. Cause: {}", frameIndex, result) THEN_ABORT(result); } } - + // Reset fences here. In case swapchain was out of date, we leave the fences signalled. result = device.m_Device.resetFences(1, ¤tFrame->m_FrameAvailableFence); ERROR_IF(Failed(result), "Fence {} reset failed. Cause: {}", frameIndex, result) THEN_ABORT(result); @@ -227,7 +227,7 @@ main(int, char **) viewport.width = Cast(swapchain.m_Extent.width); viewport.height = -Cast(swapchain.m_Extent.height); scissor.extent = swapchain.m_Extent; - break; + break; // Present failed. We redo the frame. default: ERROR("Command queue present failed. Cause: {}", result) THEN_ABORT(result);