c++ test

C++ code posted by none
created at 07 Jul 17:34

Edit | Back
1
2
3
4
5
6
7
8
9
10
11
// some C++ code
void Game::mainLoop() 
{
    timeSinceLastUpdate += delta;
    while (timeSinceLastUpdate > TimePerFrame) { // using fixed delta
        timeSinceLastUpdate -= TimePerFrame;
        processEvents();
        update(TimePerFrame);
    }
    draw(window); 
}
282 Bytes in 2 ms with coderay