title: opengl es, error when glActiveTexture
body: <p>I am developing a Qt 5.4 based application in Android system.
  I am generating several OES textures and rendering in a <code>Qt FBO TEXTURE_2D</code> by a shader. Each OES texture has its own eglcontext, and everyone has the same sharedContext. OES textures are used one by one, I mean, I am not trying to render more than one at the same time but I need to create more than one because of I have to be able to render more than one at the same time in the future.</p>
  
  <p>This is the code I am using when I have to update:</p>
  
  <pre><code>m_program-&gt;bind();
  glActiveTexture(GL_TEXTURE0 + textureId);
  glBindTexture(GL_TEXTURE_EXTERNAL_OES, textureId);
  /* my code to fill shader attr and glDraw*() */
  glBindTexture(GL_TEXTURE_EXTERNAL_OES, 0);
  m_program-&gt;release();
  </code></pre>
  
  <p>The problem is, for some reason, I can just render the first one OES texture created because I get a <code>W/Adreno-ES20(28468): &lt;core_glActiveTexture:348&gt;: GL_INVALID_ENUM</code> when trying to glActiveTexture the second one. So, target texture is filled black.</p>
  
  <p>I have checked all of this and is correct:</p>
  
  <ul>
  <li>textureId</li>
  <li>sharedContext when calling eglCreateContext.</li>
  <li>current eglContext when rendering, I mean, when calling to above
  code.</li>
  <li>Second OES texture has is filled</li>
  <li>GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS 16</li>
  <li>GL_MAX_TEXTURE_IMAGE_UNITS 16</li>
  <li>GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS 32</li>
  </ul>
  
  <p>I am a little lost and I am not sure if I this is a limitation or an error in my code.</p>
  
  <p>Any thoughts?</p>
  
  <p>EDIT: Trying in other device, application works properly, so I consider the issue is regarding a device limitation..</p>