title: OpenGL es 2.0 render issues on certain devices
body: <p>I'm experiencing a very bizarre issue with OpenGL ES 2.0 on certain android devices. I'm using OpenTK and Xamarin.Android</p>
  
  <p>The following method renders the screen, it is capped at 1FPS for testing purposes:</p>
  
  <pre><code>int hexagonID = 15;
      protected override void OnRenderFrame(FrameEventArgs e)
      {
          base.OnRenderFrame(e);
          br.updateHex(hexagonID++, GameUtils.Green, true); 
          GL.ClearColor(0.0f, 0.0f, 0.0f, 1.0f);
          GL.Enable(EnableCap.Blend);
          GL.BlendFunc(BlendingFactorSrc.SrcAlpha, BlendingFactorDest.OneMinusSrcAlpha);
          GL.Clear(ClearBufferMask.ColorBufferBit);
          spriteMapTexture.use();
          program.Uniforms["mvp"].SetData&lt;Matrix4&gt;(mvp);
          program.Uniforms["hextex"].SetData&lt;int&gt;(0);
          br.RenderBoard();
          SwapBuffers();
      }
  </code></pre>
  
  <p>RenderBoard method: </p>
  
  <pre><code> //Render the board
      public void RenderBoard()
      {
          _program.Use();
          boardVAO.Bind();
          unsafe
          {
              fixed (uint* ptr = indices)
              {
                  GL.DrawElements(BeginMode.Triangles, indices.Length, DrawElementsType.UnsignedInt, new IntPtr(ptr));
              }
          }
          boardVAO.Unbind();
          _program.Unuse();
      }
  </code></pre>
  
  <p>Expected behavior is that a hexagon's color changes every second. This code <strong>works</strong> on a OnePlusOne phone running an Adreno 330 &amp; ES 3.00</p>
  
  <p>However, this code does <strong>not work</strong> on a Samsung Galaxy S3 running an Adreno 225 &amp; ES 2.00. I don't understand why this would be the case as I do not call any 3.00 functions and my shaders are written for GLSL 1.00</p>
  
  <p>ScreenShots: 
  OnePlusOne, Expected Behavior after a few seconds
  <a href="https://i.stack.imgur.com/SDT8r.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/SDT8r.png" alt="enter image description here"></a></p>
  
  <p>Galaxy S3, No change after a few seconds
  <a href="https://i.stack.imgur.com/vILPV.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/vILPV.png" alt="enter image description here"></a></p>
  
  <p>libEGL trace:</p>
  
  <pre><code>08-08 20:54:36.026 D/libEGL  (18551): glGetError();
  08-08 20:54:36.977 D/libEGL  (18551): glBindBuffer(GL_ARRAY_BUFFER, 2); 
  //update Board Buffer
  08-08 20:54:36.977 D/libEGL  (18551): glGetError();
  08-08 20:54:36.987 D/libEGL  (18551): glBufferData(GL_ARRAY_BUFFER, 17920, (const GLvoid *) 0x00000000, GL_DYNAMIC_DRAW);
  08-08 20:54:36.987 D/libEGL  (18551): glBufferSubData(GL_ARRAY_BUFFER, 0, 17920, (const GLvoid *) 0x67b15020);
  08-08 20:54:36.987 D/libEGL  (18551): glGetError();
  08-08 20:54:36.997 D/libEGL  (18551): glBindBuffer(GL_ARRAY_BUFFER, 3);
  08-08 20:54:36.997 D/libEGL  (18551): glGetError();
  08-08 20:54:36.997 D/libEGL  (18551): glBufferData(GL_ARRAY_BUFFER, 8960, (const GLvoid *) 0x00000000, GL_DYNAMIC_DRAW);
  08-08 20:54:36.997 D/libEGL  (18551): glBufferSubData(GL_ARRAY_BUFFER, 0, 8960, (const GLvoid *) 0x67b1a020);
  08-08 20:54:36.997 D/libEGL  (18551): glGetError();
  //Clear and Blending
  08-08 20:54:37.007 D/libEGL  (18551): glClearColor(0, 0, 0, 1);
  08-08 20:54:37.007 D/libEGL  (18551): glEnable(GL_BLEND);
  08-08 20:54:37.007 D/libEGL  (18551): glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
  08-08 20:54:37.007 D/libEGL  (18551): glClear(GL_COLOR_BUFFER_BIT);
  08-08 20:54:37.007 D/libEGL  (18551): glActiveTexture(GL_TEXTURE0);
  08-08 20:54:37.007 D/libEGL  (18551): glBindTexture(GL_TEXTURE_2D, 1);
  08-08 20:54:37.007 D/libEGL  (18551): glGetError();
  08-08 20:54:37.017 D/libEGL  (18551): glUseProgram(3);
  08-08 20:54:37.017 D/libEGL  (18551): glGetError();
  //set uniforms
  08-08 20:54:37.017 D/libEGL  (18551): const GLfloat value[] = {
  08-08 20:54:37.017 D/libEGL  (18551):     0.00277778, 0, 0, 0,
  08-08 20:54:37.017 D/libEGL  (18551):     0, -0.0015625, 0, 0,
  08-08 20:54:37.017 D/libEGL  (18551):     0, 0, -1, 0,
  08-08 20:54:37.017 D/libEGL  (18551):     -1, 1, 0, 1
  08-08 20:54:37.017 D/libEGL  (18551): };
  08-08 20:54:37.027 D/libEGL  (18551): glUniformMatrix4fv(0, 1, GL_FALSE, value);
  08-08 20:54:37.027 D/libEGL  (18551): glUniform1i(1, 0);
  //draw elements
  08-08 20:54:37.027 D/libEGL  (18551): glBindVertexArrayOES(1);
  08-08 20:54:37.027 D/libEGL  (18551): glGetError();
  08-08 20:54:37.027 D/libEGL  (18551): glDrawElements(GL_TRIANGLES, 2880, GL_UNSIGNED_INT, (const GLvoid *) 0x67b12020);
  08-08 20:54:37.027 D/libEGL  (18551): glBindVertexArrayOES(0);
  08-08 20:54:37.027 D/libEGL  (18551): glGetError();
  08-08 20:54:37.027 D/libEGL  (18551): glUseProgram(0);
  08-08 20:54:37.027 D/libEGL  (18551): glGetError();
  </code></pre>
  
  <p>any insight is greatly appriciated</p>
  
  <p>UPDATE: </p>
  
  <p>I found the following messages from logcat, not sure if they are relevant</p>
  
  <pre><code>08-08 20:54:31.321 W/Adreno-GSL(18551): &lt;get_panel_settings:3802&gt;: Android framework reported version 2. So, don't force ES30
  </code></pre>
  
  <p>and</p>
  
  <pre><code>08-08 20:54:31.521 W/Adreno-EGL(18551): &lt;qeglDrvAPI_eglGetConfigAttrib:603&gt;: EGL_BAD_ATTRIBUTE
  </code></pre>
  
  <p>UPDATE2: My indices are uints, could this be the issue?</p>
  
  <p>UPDATE3: I have narrowed the issue down to devices running Android 4.4.2; I upgraded a 4.4.2 phone to 6.0 and this issue went away. Is there a bug in 4.4.2? </p>