Apologies if this has been answered before. If I set glfwSwapInterval(0) my app runs around 500 fps. If I set glfwSwapInterval(1) my app does not run at 60fps as expected I get around 50 to 54. My monitor refresh rate is 60. I’m running windows 10. I have run through Render Doc and get the same discrepancy.
Hi Simon, welcome to the GLFW forums!
It’s difficult to answer this question without having the complete source code and system information, as there are so many factors.
First off it’s important to know that in windowed mode GLFW has to use DwmFlush to support swap intervals correctly on Windows 10 or any version of Windows with Desktop Window Manager (DWM) composition, as each window draws to it’s own surface which is then composited, and there is no vertical sync. So you should measure performance in fullscreen if you do not want to be measuring the performance of the DWM composition as well as your application.
For performance related issues, it can be worth investigating both the CPU and GPU performance. Visual Studio has decent performance analysis tools, but if you need further help I can make some more recommendations.
Thanks for the reply I look at running full screen.