optimizing iPhone OpenGL ES fill rate

前端 未结 7 841

I have an Open GL ES game on the iPhone. My framerate is pretty sucky, ~20fps. Using the Xcode OpenGL ES performance tool on an iPhone 3G, it shows:

Renderer Utilization

7条回答
  •  梦如初夏
    2021-01-31 22:43

    In a similar situation (porting a 2D Adventure game to the iPad). My 3GS version was running more or less locked at 60FPS, put it on iPad dropped it (and my jaw) to 20fps.

    Turns out ONE of the little gotchas involved is that the PVR cards hate GL_ALPHA_TEST; on the PC that actually has a slight positive effect (especially on older intel chips), but they're death on fillrate on the iPhone. Changing that to

     glDisable(GL_ALPHA_TEST);
    

    gave me an immediate 100% boost in FPS (up to 40 FPS). Not bad for one line of code.. :)

    Allan

提交回复
热议问题