Fix release

This commit is contained in:
2026-02-22 12:08:03 -05:00
parent 431015f009
commit b38cc5e3d5
4 changed files with 30 additions and 6 deletions

View File

@@ -195,6 +195,20 @@ void JulietApplication::Shutdown()
void JulietApplication::Update()
{
static LARGE_INTEGER frequency = {};
static LARGE_INTEGER lastTime = {};
if (frequency.QuadPart == 0)
{
QueryPerformanceFrequency(&frequency);
QueryPerformanceCounter(&lastTime);
}
LARGE_INTEGER currentTime;
QueryPerformanceCounter(&currentTime);
float deltaTime = static_cast<float>(currentTime.QuadPart - lastTime.QuadPart) / static_cast<float>(frequency.QuadPart);
lastTime = currentTime;
CameraTime += deltaTime;
bool reloadShaders = false;
static bool reloadShadersDebounce = false;
@@ -315,8 +329,7 @@ DepthStencilTargetInfo* JulietApplication::GetDepthTargetInfo()
Camera JulietApplication::GetDebugCamera()
{
static float time = 0.0f;
time += 0.016f;
float time = CameraTime;
float orbitSpeed = 0.5f;
float currentOrbitTime = time * orbitSpeed;

View File

@@ -48,6 +48,7 @@ class JulietApplication : public Juliet::IApplication
int AutoCloseFrameCount = -1;
bool Running = false;
float CameraTime = 0.0f;
};
JulietApplication& GetEditorApplication();