Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>There's no real maximum for OpenGL ES commands, but each one does have some overhead associated with it. Redundant state changes should be eliminated, and expensive state changes should be reduced by grouping geometry in ways that everything using one state is drawn, then the next. Apple has some recommendations for this in their <a href="http://developer.apple.com/library/ios/documentation/3DDrawing/Conceptual/OpenGLES_ProgrammingGuide/Performance/Performance.html#//apple_ref/doc/uid/TP40008793-CH105-SW1" rel="nofollow noreferrer">OpenGL ES Programming Guide for iOS</a>.</p> <p>However, I've rarely found the OpenGL ES commands to be the cause of significant performance degradation in my applications. The larger problems tend to be due to the size of your geometry or from the complexity of any shaders or other effects you apply to your scene. I share some tips that I've applied for reducing geometry size <a href="https://stackoverflow.com/questions/5718846/how-can-i-optimize-the-rendering-of-a-large-model-in-opengl-es-1-1/5721102#5721102">here</a>, and one tool for profiling shaders <a href="https://stackoverflow.com/questions/3320661/powervr-sgx535-shader-performance-opengl-es-2-0/6051739#6051739">here</a>, but I'm still <a href="https://stackoverflow.com/questions/6051237/how-can-i-improve-the-performance-of-my-custom-opengl-es-2-0-depth-texture-genera">learning the ins-and-outs of shader tuning</a> myself.</p> <p>If you do really care about fine-tuning the OpenGL calls you're making, the best profiling tool to use is the new OpenGL ES Analyzer instrument that comes with Xcode 4. I show a couple of example screens from that instrument in my answer <a href="https://stackoverflow.com/questions/5594951/full-screen-background-texture-with-opengl-performance-issue-ipad/5597223#5597223">here</a>, where I used it to identify some redundant settings. It will find these calls for you, and point out where they are in your code. You can also use Time Profiler to see if you're putting more load on the CPU than you should be when rendering your frames, and track down the offending lines of code.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload