title: OpenGL gradient fill on iPhone looks striped
body: <p>When I draw a gradient fill with OpenGL, the output looks striped, i.e. it's rendered with only about the a fourth of the possible colors.</p>
  
  <p>In the render buffer all the colors appear but not in the actual output.</p>
  
  <p>I'm developing on iPhone 3G running iOS4.</p>
  
  <p>Any ideas?</p>
  
  <p>Peter</p>
  
  <p>==========</p>
  
  <p><img src="https://i.stack.imgur.com/xY0xy.png" alt="alt text"></p>
  
  <p>==========</p>
  
  <pre><code>GLint redBits, greenBits, blueBits;
  glGetIntegerv (GL_RED_BITS, &amp;redBits); // ==&gt; 8
  glGetIntegerv (GL_GREEN_BITS, &amp;greenBits); // ==&gt; 8
  glGetIntegerv (GL_BLUE_BITS, &amp;blueBits); // ==&gt; 8
  
  glDisable(GL_BLEND);
  glDisable(GL_DITHER);
  glDisable(GL_FOG);
  glDisable(GL_LIGHTING);
  glDisable(GL_TEXTURE_2D);
  glShadeModel(GL_SMOOTH);
  
  const GLfloat vertices[] = {
  0, 0,
  320, 0,
  0, 480,
  320, 480,
  };
  
  const GLubyte colors[] = {
  255, 255, 255, 255,
  255, 255, 255, 255,
  200, 200, 200, 255,
  200, 200, 200, 255,
  };
  
  glVertexPointer(2, GL_FLOAT, 0, vertices);
  glEnableClientState(GL_VERTEX_ARRAY);
  glColorPointer(4, GL_UNSIGNED_BYTE, 0, colors);
  glEnableClientState(GL_COLOR_ARRAY);
  glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);
  </code></pre>