# glfwSwapInterval

**URL:** <https://discourse.glfw.org/t/glfwswapinterval/1491>\
**Category:** support\
**Created:** [February 15, 2020, 1:07am UTC](https://discourse.glfw.org/t/glfwswapinterval/1491 "2020-02-15T01:07:08Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![simoncl](https://avatars.discourse-cdn.com/v4/letter/s/e47774/32.png) [@simoncl](https://discourse.glfw.org/u/simoncl)\
**Post date:** [February 15, 2020, 1:07am UTC](https://discourse.glfw.org/t/glfwswapinterval/1491/1 "2020-02-15T01:07:08Z")

</div>

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.

Any thoughts?

Cheers

Simon

---

<div class="post-metadata">

**Author:** ![dougbinks](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.glfw.org/dougbinks/32/39_2.png) [@dougbinks](https://discourse.glfw.org/u/dougbinks)\
**Post date:** [February 15, 2020, 1:45pm UTC](https://discourse.glfw.org/t/glfwswapinterval/1491/2 "2020-02-15T13:45:40Z")

</div>

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](https://docs.microsoft.com/en-us/windows/win32/api/dwmapi/nf-dwmapi-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.

---

<div class="post-metadata">

**Author:** ![simoncl](https://avatars.discourse-cdn.com/v4/letter/s/e47774/32.png) [@simoncl](https://discourse.glfw.org/u/simoncl)\
**Post date:** [February 16, 2020, 1:34am UTC](https://discourse.glfw.org/t/glfwswapinterval/1491/3 "2020-02-16T01:34:59Z")

</div>

Thanks for the reply I look at running full screen.

Cheers

Simon
