5

Is glfwSwapInterval(1) reliable enough to cap framerate to 60 fps, or should I manually cap it myself? I often see people manually capping framerates instead of using this function.

Will the function provide a steadier, more stable fps than manual capping?

MX wb
  • 61
  • 1
  • 5

1 Answers1

1

As far as I know, the glfwSwapInterval is to do with the v-sync on your monitor/graphics card. Have a look at this forum post which goes into more detail:

https://www.opengl.org/discussion_boards/showthread.php/177446-glfwSwapInterval%28%29-and-glfwSwapBuffer%28%29-Questions

I'm not sure but on most modern hardware I expect it won't make much of a difference!

Alex E
  • 58
  • 5
  • I know what it is, and this doesn't really answer the question – MX wb Jan 06 '18 at 22:46
  • 2
    The question is if a method of a very widely used and well-maintained API reliable. This is highly variable depending on the system that the code is run on among other things so I felt providing clarity on how it worked would help you understand if it would be better for your solution. If you would like a more specific answer in the future I would recommend saying more about what you already know to give someone answering a good basis! Sorry I couldn't help fully! – Alex E Jan 06 '18 at 23:02