title: How to render a texture to an Android GLSurfaceView
body: <p>I have a standard GLSurfaceView class:</p>
  
  <pre><code>public class TestSurfaceView extends GLSurfaceView {
      public MainRenderer mRenderer;
  
      public GStreamerSurfaceView(Context context) {
          super(context);
  
          setEGLContextClientVersion(2);
          mRenderer = new MainRenderer(context);
          setRenderer(mRenderer);
          setRenderMode(GLSurfaceView.RENDERMODE_CONTINUOUSLY);
      }
  }
  </code></pre>
  
  <p>I have a Renderer class that implements GLSurfaceView.Renderer:</p>
  
  <pre><code>public class MainRenderer implements GLSurfaceView.Renderer {
      private int[] hTex;
      private SurfaceTexture mSTexture;
      private Context context;
  
      MainRenderer(Context c) {
          context = c;
      }
  
      public void onSurfaceCreated(GL10 unused, EGLConfig config) {
      }
  
      public void onDrawFrame(GL10 unused) {
      }
  
      public void onSurfaceChanged(GL10 unused, int width, int height) {
      }
  
      public void onSurfaceCreated(GL10 arg0, javax.microedition.khronos.egl.EGLConfig arg1) {
      }
  }
  </code></pre>
  
  <p>In a separate JNI thread, I have some video data (YUV format) uploaded to an OpenGLES texture. I receive in Java the notification that a new texture is available and I have the corresponding texture id.</p>
  
  <p>How can I display the content of this texture in the Renderer class with minimum performance impact?</p>