d3dcoder / d3d12book

Sample code for the book "Introduction to 3D Game Programming with DirectX 12"
1.47k stars 571 forks source link

The Reset() in GameTimer.cpp , why not reset mPausedTime??? #15

Closed Jamesika closed 6 years ago

Jamesika commented 6 years ago

The Reset() in GameTimer.cpp , why not reset mPausedTime???

void GameTimer::Reset()
{
    __int64 currTime;
    QueryPerformanceCounter((LARGE_INTEGER*)&currTime);

    mBaseTime = currTime;
    mPrevTime = currTime;
    mStopTime = 0;
    mStopped  = false;
}
Jamesika commented 6 years ago

Oh I think it should be called only once ( before game loop )