Getting stuck at 40 fps even with using CADisplayLink?

后端 未结 3 576
旧时难觅i
旧时难觅i 2021-02-06 15:40

At first I used NSTimer and ran into the problem of the frame rate being stuck at 40 frames per second. I\'ve read about using CADisplayLink to fix the problem. It seemed to w

3条回答
  •  情歌与酒
    2021-02-06 16:13

    I have got the same issue on 3G. I have simplified my app just to FPS counter drawn over the blank (pink) backbuffer and it was 40 fps nevertheless.

    After some googling I have found a very similar issue being discussed at cocos2d-iphone.org forum.

    The solution was to turn off autorotation of the view controller. So i made my shouldAutorotateToInterfaceOrientation always return NO and this worked (!!!). I had stable 60 FPS. Then I returned my simple game graphics back and it was stable 60 FPS. But my game expected to run in the landscape mode is currently running in default portrait mode.

    I have no desire to write my own autorotation code so looks like I am switching back to 40 fps. Does anybody know how to avoid this autorotation framerate drop?

提交回复
热议问题