Fix release
This commit is contained in:
@@ -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(¤tTime);
|
||||
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;
|
||||
|
||||
@@ -48,6 +48,7 @@ class JulietApplication : public Juliet::IApplication
|
||||
|
||||
int AutoCloseFrameCount = -1;
|
||||
bool Running = false;
|
||||
float CameraTime = 0.0f;
|
||||
};
|
||||
|
||||
JulietApplication& GetEditorApplication();
|
||||
|
||||
Reference in New Issue
Block a user