title: OpenGL ES GL_DEPTH_TEST Performance issue
body: <p>I'm writing an OpenGL ES 2.0 game in C++ running on multiple (mobile) platforms.
  On IOS,Android,.. basically everything runs fine, except one device:</p>
  
  <p>The computation for one frame in a specific scene take about 8ms on an HTC Desire.
  Another device, a Samsung Galaxy Nexus, which is much newer takes 18-20ms.</p>
  
  <p>I digged into the problem and found out that it is related to enable/disable of GL_DEPTH_TEST.</p>
  
  <ul>
  <li>if I comment out all glEnable(GL_DEPTH_TEST)/glDisable(GL_DEPTH_TEST) calls the time needed for one frame drops to 1-2ms on the Nexus.</li>
  <li>so I optimized the glEnable()/glDisable() calls to occur only when absolutely needed. I have 3d and 2d parts in my scene and therefore need to render 2d without depth_test and 3d with depth test.</li>
  <li>currently I enable depth test, draw 3d, disable depth test, draw 2d</li>
  <li>but still the computation takes 18-20ms on the nexus</li>
  <li>I also checked if the depth buffer is cleared more than needed. But it is just cleared at the start of the frame.</li>
  </ul>
  
  <p>Is it possible that the switch of the depth test takes that much time?</p>
  
  <p>Does anyone have other ideas what can be checked?</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>I found out that the 3d object I render is somehow responsible for the slow computation.</p>
  
  <ul>
  <li>If I remove the 3d object the performance is good</li>
  <li>but the same 3d object is used in another scene without causing such trouble</li>
  <li>and the weirdest thing: the Nexus runs Android 4.2 and it has an option in the developer options to visualize the cpu load as an overlay. If I enable this setting and start the game, the computation time is 5-6ms instead of 18-20ms. How can this be related?</li>
  </ul>