iosopengl-escadisplaylink

CADisplayLink frame rate on 10.5" iPad Pro


We have an OpenGL-based iOS app. We use a CADisplayLink to control our drawing updates.

I just got the new 10.5" iPad Pro and we are getting a maximum frame rate of 60 rather than the 120 we can theoretically get on the new hardware.

We set up the display link like this:

    self.caDisplayLink = [CADisplayLink displayLinkWithTarget:self selector:@selector(displayLinkCalled:)];
    caDisplayLink.preferredFramesPerSecond = 120;
    NSLog(@"Maximum FPS = %ld", [UIScreen mainScreen].maximumFramesPerSecond);
    [caDisplayLink addToRunLoop:[NSRunLoop currentRunLoop] forMode:NSDefaultRunLoopMode];

The displayLinkCalled: method is called 60 times per second. The log statement does indicate the UIScreen's maximum frame rate is 120 FPS.

Is there anything else I need to do to update at higher than 60 FPS?


Solution

  • Did you opt-in? You need to add a key to your plist

    <key>CADisableMinimumFrameDuration</key>
     <true/>