OpenGL ES 的哪一部分使我的 iPhone 应用程序有点慢?
我目前正在使用 OpenGL ES 开发我的 iPhone 应用程序。这是一款具有亮度和对比度的镜子应用程序。但我现在遇到的问题是使用它时速度有点慢(大约0.2秒延迟)。但帧率大约是60秒。所以我的问题是 OpenGL 的哪一部分需要时间来处理?
I am currently developing my iPhone App with OpenGL ES. It is mirror app with brightness and contrast. But the problem i am having now is it is bit slower(about 0.2s delay) when you use it. But the frame rate is about 60 seconds. So my quesion is which part of OpenGL takes time to process?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
你所遇到的是滞后(而不是缓慢)。而且它不是由 OpenGL 引起的(至少不完全是)。延迟发生在相机以及读取和解码相机图片的过程中。
一些延迟是不可避免的:
因此,您可以获得的最短延迟约为 1s/30 + 1s/60 = 0.05s
任何高于此值的延迟都是由于处理开销而产生的。我很可能会说你的来自解码图像以及该过程中的缓冲区分配。不过我需要查看你的源代码才能确定。
What you have is lag (not slowness). And it's not caused by OpenGL (at least not entirely). The latencies happen in the camera and the process of reading and decoding the camera pictures.
Some latency is unavoidable:
So the shortest lag you can get are about 1s/30 + 1s/60 = 0.05s
Any latency above this is created due to processing overhead. And most likely I'd say yours comes from decoding the image and maybe buffer allocations in that process. However I'd need to see your sourcecode to tell for sure.