# Making glfwSwapInterval work in GLFW 3.0

**URL:** <https://discourse.glfw.org/t/making-glfwswapinterval-work-in-glfw-3-0/567>\
**Category:** support\
**Created:** [May 14, 2013, 4:12am UTC](https://discourse.glfw.org/t/making-glfwswapinterval-work-in-glfw-3-0/567 "2013-05-14T04:12:29Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex035/uploads/glfw/original/1X/b8cdefe6b61b8d5aee6c43b2c56e9cf5eabecfe4.svg) [@system](https://discourse.glfw.org/u/system)\
**Post date:** [May 14, 2013, 4:12am UTC](https://discourse.glfw.org/t/making-glfwswapinterval-work-in-glfw-3-0/567/1 "2013-05-14T04:12:29Z")

</div>

**[martinbis11](https://sourceforge.net/u/martinbis11/)** wrote on [Tuesday, May 14, 2013](https://sourceforge.net/p/glfw/discussion/247562/thread/1a5004be/#0130):

Hi,

I’m using GLFW 3.0 from GIT and I have a problem with glfwSwapInterval under Windows 7 : it doesn’t work…

It is because \_glfwIsCompositionEnabled() returns true (see implementation of \_glfwPlatformSwapInterval in wgl\_context.c). The comment says “Don’t enabled vsync when desktop compositing is enabled, as it leads to frame jitter”.

So the question is : how can we deal with this? I’d like to use the swap interval thingy to control my frame rate, but now glfwSwapInterval “fails” silently… Since modern window managers use composition, it seems that this should be a common/almost universal problem for applications with a target framerate…

I can disable this check in GLFW, which will cause some frame jittering, but for now it’s a lesser problem… Any suggestion?

Thanks,

Martin

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex035/uploads/glfw/original/1X/b8cdefe6b61b8d5aee6c43b2c56e9cf5eabecfe4.svg) [@system](https://discourse.glfw.org/u/system)\
**Post date:** [August 9, 2013, 1:03pm UTC](https://discourse.glfw.org/t/making-glfwswapinterval-work-in-glfw-3-0/567/2 "2013-08-09T13:03:16Z")

</div>

**[miran46](https://sourceforge.net/u/miran46/)** wrote on [Friday, August 09, 2013](https://sourceforge.net/p/glfw/discussion/247562/thread/1a5004be/#df40):

Any updates on this? I have this problem with GLFW 3.0.1 and windows7 x64. My Nvidia settings for vertical sync are set to use application settings. SwapInterval works using GLFW 2.7 on the same computer.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex035/uploads/glfw/original/1X/b8cdefe6b61b8d5aee6c43b2c56e9cf5eabecfe4.svg) [@system](https://discourse.glfw.org/u/system)\
**Post date:** [August 15, 2013, 4:34pm UTC](https://discourse.glfw.org/t/making-glfwswapinterval-work-in-glfw-3-0/567/3 "2013-08-15T16:34:01Z")

</div>

**[elmindreda](https://sourceforge.net/u/elmindreda/)** wrote on [Thursday, August 15, 2013](https://sourceforge.net/p/glfw/discussion/247562/thread/1a5004be/#0333):

GLFW 3.0.2 will have the `GLFW_USE_DWM_SWAP_INTERVAL` CMake option, which will force the use of vsync even on systems using Aero and DWM.
