I tried to count the FPS in my render loop like this:
while (!glfwWindowShouldClose(window)) {
glfwPollEvents();
float current = (float) glfwGetTime();
delta = current - time;
time = current;
std::cout << 1.f / delta << std::endl;
render();
glfwSwapBuffers(window);
}
…with VSync enabled:
glfwSwapInterval(1);
…but the output looks like this:
72.0857
345.182
73.3988
343.092
71.9065
375.564
71.9188
353.294
71.9324
360.212
72.3131
277.364
So it seems like roughly every second draw call is skipped. How can I check if the drawing was skipped in a frame so that I doesn’t count it into the frame rate, what happens in these iterations and why are they skipped? I am on an ARM Mac if this is has some kind of influence.