Doing the ‘myFirstProject’ tutorial [http://openframeworks.cc/tutorials/introduction/001_chapter1.html].
I am adding the moving circle component and I only get 57-59 fps on my 2013 quad-core i7 MacBookPro! I would expect a much higher framerate. When I explicitly set ofSetFrameRate(120); I still only get the 57-59 fps.
Is there something else throttling me?
Is ofSetVerticalSync() set to true? I think that might make a difference.
ofSetVerticalSync(false); bumped it up to 680 fps. For some reason, I was expecting >>1000 fps.
Just curious, why are you trying to get/want 1000 fps?
Somebody that knows more than me can probably clarify/correct this, but as far as I understand
ofSetVerticalSync(true) locks the app’s framerate to your graphics card’s refresh rate (this is the default behavior in OF). Setting this to
false without explicitly setting
ofSetFrameRate(x) will run your program as fast as your CPU/GPU can run it (depending on what you’re doing in your code).
The disadvantage of doing this is that you may see “tearing” on your screen if you are changing things faster than your graphics card is able to draw them.
1000fps seems pretty ambitious, although theoretically you can increase your framerates by making your code more efficient (using
distanceSquared instead of
distance, for example) or maybe doing some of the work in a shader?
I am just comparing with web and Java. I easily get 1200-1400 fps in processing which is java. I would expect the C++ compiled code to be faster than that.
So why does Processing draw() loop run 2.5x faster than OF’s draw() loop?