OpenGL ES 仪器的精度

发布于 2024-08-27 16:18:32 字数 406 浏览 5 评论 0原文

我正在为 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

汹涌人海 2024-09-03 16:18:32

您使用 CADisplayLink 吗?这可能会让你的主循环更加精确。

Are you using CADisplayLink? This might give you a little bit more precision on your main loop.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文