@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
Cinder/AppImplCocoaTouch.mm at master · cinder/Cinder (github.com)
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.