title: Android SurfaceTexture, video on Sphere, OpenGL ES 2.0
body: <p>Please take a look at this screenshot:</p>
  
  <p><img src="https://i.stack.imgur.com/AqRDw.jpg" alt="enter image description here"></p>
  
  <p>As you can see I have 2 problem. </p>
  
  <p><strong>1) The sphere render is upside down</strong></p>
  
  <p><strong>2) Video is not well wrapped around the sphere.</strong> - SOLVED</p>
  
  <p>In details:</p>
  
  <p>1) The problem is strange but I think is caused by the MediaPlayer of Android and its coordinate system. With an image I haven't this issue. So what will be the solution? Of course I can rotate the sphere but this could cause others problem in the future.</p>
  
  <p>2) The video resolution, and size of the video are't the problems. An image with the same size of the video is correctly wrapped around the sphere. So There aren't bug in the UV calculations. - SOLVED</p>
  
  <p>There is something about MediaPlayer that I don't know.
  Any suggestion will be very appreciated.</p>
  
  <p>Edit:</p>
  
  <p>Second problem solved. It was necessary to repeat the texture after binding:</p>
  
  <pre><code>GLES20.glTexParameteri(GL_TEXTURE_EXTERNAL_OES, GLES20.GL_TEXTURE_WRAP_S, GLES20.GL_REPEAT);
  GLES20.glTexParameteri(GL_TEXTURE_EXTERNAL_OES, GLES20.GL_TEXTURE_WRAP_T, GLES20.GL_REPEAT);
  </code></pre>