title: Alternative approach to OpenGL View on top of Camera
body: <p>the traditional way of doing a camera preview background with OpenGL on the front is to take two SurfaceViews(one for the camera another for OpenGL) and stack them on top of each other.
  The problem is that stacking SurfaceViews is discouraged:</p>
  
  <p><a href="http://groups.google.com/group/android-developers/browse_thread/thread/4850fe5c314a3dc6" rel="nofollow">http://groups.google.com/group/android-developers/browse_thread/thread/4850fe5c314a3dc6</a></p>
  
  <p>So what alternatives are there? I was considering the following:</p>
  
  <ol>
  <li>Subclass GlSurfaceView, and then call set the Camera preview onto the holder of this subclass: Camera.setPreviewDisplay(mHolder);</li>
  <li>Don't use GLSurfaceView, instead create your own SurfaceView subclass where you display the Camera preview onto the holder and also draw your openGL. This would require to use OpenGL without GLSurfaceView, has anyone done this before?</li>
  </ol>
  
  <p>I'm not sure if this even is possible or makes sense, since it implies displaying the camera preview onto the holder of the surface and at the same time drawing OpenGL on the same surface.
  Is there any other sensible alternative to solving the problem without using two SurfaceViews?</p>
  
  <p>Thanks!</p>