在 ipad 上使用 opengl es 在 1 帧中最多可以绘制多少个三角形? [英] How many maximum triangles can be drawn on ipad using opengl es in 1 frame?

查看:17
本文介绍了在 ipad 上使用 opengl es 在 1 帧中最多可以绘制多少个三角形?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

ipad 上单帧最多可以绘制多少个三角形.另外,用于绘制这些三角形的 gl 调用的数量是否有限制?

How many maximum triangles can be drawn on ipad in a single frame. Also, is there a limit to the number of gl calls used to draw those triangles?

推荐答案

您在 iPad 上遇到的总三角形的唯一限制是内存大小以及您希望它以多快的速度呈现.您发送的顶点越多,您的应用程序将使用的内存越多,渲染速度就越慢.

The only limit on total triangles that you'll run into on the iPad is in terms of memory size and how quickly you wish for this to render. The more vertices you send, the more memory your application will use, and the slower it will render.

例如,在我的基准测试中,我能够在 iPad 1 上使用 OpenGL ES 1.1 平滑着色、单个光源、存储在顶点缓冲区对象 (VBO) 中的几何图形以及由 GLshorts 表示的顶点每秒推送超过 1,800,000 个三角形为了最小化总尺寸.iPad 2 比这要快得多,尤其是当您开始在片段着色器中执行更复杂的操作时.根据这个数字,我可以估计,如果我想在 iPad 1 上以 60 FPS 的速度进行渲染,我的场景几何图形中的三角形应该少于 30,000 个.

For example, in my benchmarks I was able to push over 1,800,000 triangles per second on an iPad 1 using OpenGL ES 1.1 smooth shading, a single light source, geometry stored in vertex buffer objects (VBOs), and vertices represented by GLshorts in order to minimize total size. The iPad 2 is significantly faster than that, especially when you start doing more complex operations in your fragment shaders. From that number, I can estimate that I'd want to have fewer than 30,000 triangles in my scene geometry if I wanted to render at 60 FPS on the iPad 1.

OpenGL ES 2.0 着色器因其复杂性不同而使事情变得更加复杂,但它们启用了新的效果,并且可能允许您使用更少的三角形来实现与固定功能管道相同的图像质量.

OpenGL ES 2.0 shaders make things more complicated because of their varying complexity, but they enable new effects and may allow you to use fewer triangles to achieve the same image quality as the fixed function pipeline.

再举一个例子,在 这个问题 Davido 有一个包含大约 900,000 个三角形的模型,他能够在 iPad 2 上以接近 10 FPS 的速度进行渲染.我还在 我的答案 当您使用 最大化设备上的平铺利用率.

For another example, in this question Davido has a model with about 900,000 triangles that he's able to render at nearly 10 FPS on an iPad 2. I also present some geometry optimization techniques in my answer there that I've found to have a significant impact on OpenGL ES 1.1 rendering when you are maxing out tiler utilization on the device.

这篇关于在 ipad 上使用 opengl es 在 1 帧中最多可以绘制多少个三角形?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆