Making glfwSwapInterval work in GLFW 3.0

Using GLFW
2013-05-14
2013-08-15
  • Martin Bisson

    Martin Bisson - 2013-05-14

    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

     
  • Miroslav Andel

    Miroslav Andel - 2013-08-09

    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.

     
  • Camilla Löwy

    Camilla Löwy - 2013-08-15

    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.

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks