Added: world, view & projection matrices Added: delta time calculation Added: quad mesh
28 lines
480 B
C++
28 lines
480 B
C++
#include "Time.h"
|
|
#include <string>
|
|
|
|
UINT Time::init()
|
|
{
|
|
_lastTime = CLOCK::now();
|
|
|
|
return 0;
|
|
}
|
|
|
|
void Time::update()
|
|
{
|
|
TIME_POINT now = CLOCK::now();
|
|
SECONDS diff = now - _lastTime;
|
|
_deltaTime = diff.count();
|
|
_lastTime = now;
|
|
|
|
#if _DEBUG
|
|
wstring output = L"delta time: " + to_wstring(_deltaTime) + L"\n";
|
|
output += L"fps: " + to_wstring(1.0f / _deltaTime) + L"\n";
|
|
OutputDebugString(output.c_str());
|
|
#endif // _DEBUG
|
|
}
|
|
|
|
void Time::deInit()
|
|
{
|
|
}
|