Add logic to allow lazy rendering
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
#include "Base/FrameMetadata.hpp"
|
||||
#include "PlatformProducer.hpp"
|
||||
#include "Input/InputManager.hpp"
|
||||
#include "Base/EngineConfiguration.hpp"
|
||||
#include <chrono>
|
||||
#include <thread>
|
||||
#include <stdexcept>
|
||||
@@ -140,11 +141,12 @@ namespace OpenVulkano
|
||||
{
|
||||
Input::InputManager::GetInstance()->Tick();
|
||||
app->Tick();
|
||||
renderer->Tick();
|
||||
if (CURRENT_FRAME.shouldDraw) renderer->Tick();
|
||||
frameTimer.Tick();
|
||||
UpdateFps();
|
||||
CURRENT_FRAME.frameId = frameCount;
|
||||
CURRENT_FRAME.frameTime = frameTimer.GetTickSeconds();
|
||||
CURRENT_FRAME.shouldDraw = !EngineConfiguration::GetEngineConfiguration()->GetLazyRendering();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user