title: TextureView vs. GLSurfaceView or How to use GLSurfaceView with EGL14
body: <p>I am getting confused with EGL.</p>
  
  <p>My GLSurfaceView creates an EGLContext. Now I create a shared context. Now I need to use a EGLExtension. </p>
  
  <p>The Method I have to use is called (>=API18):</p>
  
  <pre><code>EGLExt.eglPresentationTimeANDROID(android.opengl.EGLDisplay display, android.opengl.EGLSurface surface, long time);
  </code></pre>
  
  <p>The Problem is, that the GLSurfaceView does only creates javax.microedition.khronos.egl.EGLContext s.</p>
  
  <p>Which tells me, NOT to use GLSurfaceView. So I tried TextureView, which is slightly similar, with the difference that you have to handle your own EGL stuff. Which is good for that purpose.</p>
  
  <p>But:
  The TextureView is slower, at least it looked like that, so I recorded some diagrams with the Method Profiler:</p>
  
  <p>Here the TextureView with own EGL Handling:
  <img src="https://i.stack.imgur.com/iYlEK.jpg" alt="enter image description here">
  The Thread on the top is a clock that wakes the Thread in the middle, which renders onto the TextureView. The main Thread will be called after that, for redrawing the TextureView.</p>
  
  <p>... and here the GLSurfaceView with their own EGL Handling
  The clock is in the middle this time, it calls the Thread on the top to render my image into a framebuffer, which I give directly into the SurfaceView (RENDERMODE_WHEN_DIRTY) and call requestRender to request the view to render.
  <img src="https://i.stack.imgur.com/QJUyY.jpg" alt="enter image description here"></p>
  
  <p>As you can see with a short look already that with the GLSurfaceView it looks way cleaner that with the TextureView.</p>
  
  <p>On both Examples I havn't had anything else on the screen and they rendered exactly the same Meshes with the same shader.</p>
  
  <p>To my question:
  Is there a way to use GLSurfaceView with EGL14 Contexts?</p>
  
  <p>Did I do something wrong?</p>