title: Copying data from one texture to another - opengl
body: <p>I'm rendering my camera preview in android on a <code>SurfaceTexure</code>. This <code>SurfaceTexture</code> is bound to target <code>GL_TEXTURE_EXTERNAL_OES</code>.
  I want to copy the texture data from this <code>SurfaceTexture</code> object to my custom OpenGL texture which is bound to <code>GL_TEXTURE_2D</code>.</p>
  
  <p>My onFrameAvailable callback is as follows :</p>
  
  <pre><code>@Override
  public void onFrameAvailable(final SurfaceTexture surfaceTexture) {
      glView.queueEvent(new Runnable() {
          @Override
          public void run() {
              surfaceTexture.updateTexImage();
              //TODO: Copy this texture to the custom texture
          }
      });
  }
  </code></pre>
  
  <p>I have the custom texture object created already.</p>
  
  <p>Can anyone help me with the copying part ?</p>