I am building an app for windows and wondering what the best practices are for setting up frame rate and vertical sync. I would like to have to app run at 60, but the frame rate still seems to fluctuate. I have also noticed some vertical tearing.
What are others using for their windows apps? What if anything should I be setting on the video card drivers?
Vertical sync may be overriden by you graphics card settings.
Using vertical sync can affect the (maximum) frameRate.
If you experience irregularities, try updating your graphics card drivers.
There are discussion on the internet about either/or. If you want to prevent tearing, you can use vsync. If you use vsync, the program’s framerate syncs to the monitor refresh rate, so using ofSetFrameRate wouldn’t really be needed. A while ago I ported a ‘2D generative drawing app with no moving camera’ and I found setting the fps to 60 using ofSetFrameRate very useful, because otherwise the whole drawing app would move at lightning speed. So I guess the main question is if you want to prevent screen tearing or if you want to limit/set the framerate.
Also check out the OF GitHub repository’s issues, for example here and here.