Allow redraw requests during rendering

This commit is contained in:
Georg Hagen
2024-10-25 15:31:16 +02:00
parent 55894a9bd1
commit 2a02a34f19

View File

@@ -195,6 +195,7 @@ namespace OpenVulkano
auto start = clock::now(); auto start = clock::now();
inputManager->Tick(); inputManager->Tick();
app->Tick(); app->Tick();
CURRENT_FRAME.needsRedraw = !EngineConfiguration::GetEngineConfiguration()->GetLazyRendering();
if (CURRENT_FRAME.needsRedraw) renderer->Tick(); if (CURRENT_FRAME.needsRedraw) renderer->Tick();
if (cappedFrameTime.count()) if (cappedFrameTime.count())
{ {
@@ -204,7 +205,6 @@ namespace OpenVulkano
UpdateFps(); UpdateFps();
CURRENT_FRAME.frameId = frameCount; CURRENT_FRAME.frameId = frameCount;
CURRENT_FRAME.frameTime = frameTimer.GetTickSeconds(); CURRENT_FRAME.frameTime = frameTimer.GetTickSeconds();
CURRENT_FRAME.needsRedraw = !EngineConfiguration::GetEngineConfiguration()->GetLazyRendering();
} }
} }