I am running the same OpenGL executable in CLion and cmd, but they show different outputs. CLion shows the right number, cmd shows inf and sometimes the number. cout does the same.
(I've mitigated all ogl calls from the code since they're unnecessary)
The code to that is:
int i = 0;
auto lastTime = std::chrono::high_resolution_clock::now();
while ... {
auto currentTime = std::chrono::high_resolution_clock::now();
if (i % 10000 == 0) {
auto deltaTime = std::chrono::duration_cast<std::chrono::duration<float>>(currentTime - lastTime).count();
printf("FPS: %10.0f\n", 1.0f / deltaTime);
}
i++;
lastTime = currentTime;
}
CLion left, cmd right
