title: Android GLES 2.0: framebuffer rendering to half-float texture works on some devices, not others
body: <p>Using GLES 2.0 on Android, I am trying to render to a framebuffer backed by a texture. The texture and framebuffer are created like this:</p>
  
  <pre><code>final int GL_RGB16F_EXT = 0x881B;
  GLES20.glTexImage2D(GLES20.GL_TEXTURE_2D, 0, GLES20.GL_RGB, width, height, 0,
          GL_RGB16F_EXT, type, null);
  GLES20.glFramebufferTexture2D(GLES20.GL_FRAMEBUFFER, GLES20.GL_COLOR_ATTACHMENT0,
      GLES20.GL_TEXTURE_2D, textureHandle, 0);
  </code></pre>
  
  <p>For <code>type=GL_HALF_FLOAT_OES</code>, this works on some devices, but gives a <code>GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT</code> status on others.</p>
  
  <p>The texture was created with <code>GL_NEAREST</code> minify and magnify mode.</p>
  
  <p>Note that on some devices (Nexus 5), the above works only when I use "<code>GL_RGB</code>" instead of "<code>GL_RGB16F_EXT</code>" as the internal format, on some (Nexus 6/7) it works only with <code>GL_RGB16F_EXT</code>, on some it works with both (Nexus 9) and on some it doesn't work with either (Nexus 4).</p>
  
  <p>The weird thing is that all my devices, including the failing ones, report <code>GL_OES_texture_half_float</code> and <code>GL_EXT_color_buffer_half_float</code>.</p>
  
  <p>What else could I be missing here?</p>