title: android OpenGLES 1.x CameraPreview to Surfacetexture
body: <p>I am trying to send the camera preview to a surfacetexture object and render it on a square. I have running code for GLES20 but didnt find anything for 1.x. 
  Basically it should work like this, right?</p>
  
  <pre><code>// setup texture
  gl.glActiveTexture(GL10.GL_TEXTURE0);
  gl.glGenTextures(1, textures, 0);
  gl.glBindTexture(GLES11Ext.GL_TEXTURE_EXTERNAL_OES, textures[0]);
  gl.glTexParameterf(GLES11Ext.GL_TEXTURE_EXTERNAL_OES, ...);
  ...
  
  // setup surfacetexture object
  surface = new SurfaceTexture(textures[0]);
  surface.setOnFrameAvailableListener(this);
  
  
  // setup camera
  mCamera = Camera.open(0);
  Camera.Parameters param = mCamera.getParameters();
  List&lt;Size&gt; psize = param.getSupportedPreviewSizes();
  //find previewsize to match glsurface from renderer
  param.setPreviewSize(psize.get(i).width, psize.get(i).height);
  mCamera.setParameters(param);
  
  // set the texture and start preview
  mCamera.setPreviewTexture(surface);
  mCamera.startPreview();
  
  
  // in the "onFrameAvailable" handler, i switch a flag to mark a new frame
  updateSurface = true;
  
  
  // and in the renderloop i update and redraw
  if (updateSurface) {
      surface.updateTexImage();
      updateSurface = false;
  }
  gl.glActiveTexture(GL10.GL_TEXTURE0);
  gl.glBindTexture(GLES11Ext.GL_TEXTURE_EXTERNAL_OES, textures[0]);
  
  // Draw square
  gl.glVertexPointer(3, GL10.GL_FLOAT, 0, vertexBufferFloor);
  gl.glTexCoordPointer(2, GL10.GL_FLOAT, 0, textureBuffer);
  gl.glDrawArrays(GL10.GL_TRIANGLE_STRIP, 0, vertices.length / 3);
  </code></pre>
  
  <p>The square gets drawn but is completely white. I dont receive glErrors or other exceptions. The "onFrameAvailable" handler gets called too. 
  If i use glTeximage with a loaded bitmap, it is correctly drawn on the square. </p>
  
  <p>ANY ideas? Thank you!</p>