glClearColor() pushing the iPhone at 27% render utilization

为君一笑 提交于 2019-12-21 17:45:10

问题


As a result of the search for an answer of this question, I ran into a rather uncomfortable finding.

It seems that rendering only glClearColor() at 60 fps pushes the iPhone at 27% render utilization.

That means that doing hardly anything at all - only refreshing the screen - makes the iPhone use more than a quarter of its render capacity.

Is this to be expected?

The POWERVR should hit around 270 megapixels/second at least, according to the documentation. As unwind correctly stated below, 480×320 at 60 fps equals about 9.2 megapixels/second, putting the total performance at around 40 megapixels/second, wich is suspicious.


回答1:


This just means that you should design your rendering to fill all pixels every frame with actual content, so you don't need to clear the framebuffer at all. That is, at least, the classic "solution" to the bottleneck of clearing: don't do it.

In typical first-person engines, for instance, this is achieved by rendering a skybox and a ground "plane", that always cover the entire viewport.

I haven't read up on the details of the iPhone's rendering subsystem, but it does seem to indicate a very low fill-rate. 480×320 at 60 fps equals about 9.2 megapixels/second, putting the total performance at around 40. Sounds suspicious.



来源:https://stackoverflow.com/questions/882408/glclearcolor-pushing-the-iphone-at-27-render-utilization

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!