OpenGL ES 仪器的精度
我正在为 iPhone 开发一款游戏。我认为 30FPS 已经足够了,所以我编写了一些代码,只允许应用程序每 1/30 秒呈现一次渲染缓冲区。当我尝试用 Instruments 验证这一点时,我得到了不同的信息。
在 iPod Touch(2009 版,32G)上,它报告每秒核心动画帧数为 30 FPS。
在 iPhone 3G 上我得到了截然不同的结果。而且不仅仅是低于 30 FPS。我经常看到 FPS > 30。实际上看起来更接近 36-39。
为了调查此异常情况,我将自己的 FPS 添加到应用程序中并每秒更新一次。我在两台设备上都保持 29 FPS。
那么,有人对可能发生的事情有什么建议吗?我希望 Instruments 是准确的,所以它看起来不准确确实让我很担心。这让我觉得我的某个地方有错误,但我确实找不到它。
I'm developing a game for the iPhone. I've decided that 30FPS is plenty so I've written some code that only allows the App to present the render buffer every 1/30 of a second. When I tried to verify this with Instruments I got varying information.
On an iPod Touch (2009 edition, 32G) it reports 30 FPS for Core Animation Frames Per Second.
On an iPhone 3G I get wildly varying results. And not just less than 30 FPS. I see >30 FPS on a regular basis. It actually seems to hang closer to 36-39.
To investigate this anomaly I added my own FPS to the app and update it once per second. I stays right at 29 FPS on both devices.
So, does anyone have any suggestions as to what might be going on? I expect Instruments to be accurate so it really concerns me that it appears inaccurate. It makes me think I have a bug somewhere, but I sure can't find it.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您使用 CADisplayLink 吗?这可能会让你的主循环更加精确。
Are you using CADisplayLink? This might give you a little bit more precision on your main loop.