glfwSwapInterval(1)
doesn't seem to be working for me. If I force VSync in CCC or setVerticalSyncEnabled(true)
in SFML my fps drops to 60, but GLFW just keeps running at 9000 fps. Am I going about this the wrong way or is GLFW bugged?
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.