glfwSwapInterval(1) fails to enable vsync?

Well looks like GLFW doesn't want to turn VSync on when desktop compositing is enabled. If you want VSync anyway this will work on Windows:

#ifdef _WIN32
    // Turn on vertical screen sync under Windows.
    // (I.e. it uses the WGL_EXT_swap_control extension)
    typedef BOOL (WINAPI *PFNWGLSWAPINTERVALEXTPROC)(int interval);
    PFNWGLSWAPINTERVALEXTPROC wglSwapIntervalEXT = NULL;
    wglSwapIntervalEXT = (PFNWGLSWAPINTERVALEXTPROC)wglGetProcAddress("wglSwapIntervalEXT");
    if(wglSwapIntervalEXT)
        wglSwapIntervalEXT(1);
#endif

For other OSs google will help you.


Rebuild GLFW3 with the GLFW_USE_DWM_SWAP_INTERVAL option.

See glfw/src/config.h

The GLFW docs warn about jitter problems, but I don't see those myself.