title: Android OpenGL get the rendering result as a Java Byte array
body: <p>I have 2 <a href="https://www.khronos.org/registry/gles/extensions/OES/OES_EGL_image_external.txt" rel="nofollow"><code>OES_EGL_image_external</code></a> textures that I combine (sampling from both) and render to an input <code>Surface</code> given by the <code>MediaCodec</code>, and later encode and save to a mp4 file.</p>
  
  <p>What I want to do instead is get the combined frame as a Java Byte array.
  I read that rendering it to a texture and using <code>glReadPixels()</code> is really slow, and I have to keep up with about 30-40 FPS.</p>
  
  <p>What would be the most efficient way to do it in Android?</p>