Unlock 60 fps with 120 fps?


How to enable 120 fps in the Cinder? I tried a demo projects for iOS. But it seems the FPS is always locked with 60Hz

And this code is not working for me. FPS still 60hz. So I can make it only 1-60fps.


p.s. My iPad Pro 13 inch support 120 fps.

Make sure to also disable vertical sync:

void MyApp::setup()
   ci::gl::enableVerticalSync( false );


1 Like

@serg did it help? Because, unless I’m mistaken, it looks like enableVerticalSync() is not implemented for the CINDER_COCOA_TOUCH case, so that’s a no-op:

Cinder/wrapper.cpp at master · cinder/Cinder (github.com)

But, theoretically, the vertical sync on the device should be as fast as the hardware supports (240Hz or 120Hz in iPhones or iPads with ProMotion). For example, on this page, Apple says:

Not all displays use a ~16 ms frame interval; for example, vertical synchronization happens every ~4 ms on ProMotion displays.

Maybe when you explicitly setFrameRate(120) with vsync on, the app tries swapping buffers a bit too late, so you just miss the vsync, so you drop to 60Hz. What happens if you leave vertical sync alone and only call disableFrameRate()? In that case, it should draw as fast as it can, but still sync on retrace. Otherwise, I guess you might try calling setFrameRate(150) (or something faster than 120), to see if that helps.

BTW, the code to calculate the display interval also looks wrong on iOS, since it’s assuming the “default” refresh rate is 60Hz (although in your specific case it should still specify an interval of 1 when you call it with 120):

Cinder/AppImplCocoaTouch.mm at master · cinder/Cinder (github.com)

The frameInterval method is deprecated (though should still work), but looks like there is a newer preferredFramesPerSecond method, that takes into account the actual maximumFramesPerSecond of the display.

1 Like