I've been updating my app which runs a glsurface on top of a camera preview.
It works fine with the camera preview running into a surfaceview
but when I the camera preview to use a texture (which looks like a cleaner
way of doing it with and gives more flexibility) it does not work.
With a TextureView ,the camera preview works fine until I add the
glsurfaceview, at which point all the transparent bits go black.
If I use a SurfaceView then the camera preview shows through the transarent
bits just fine.
I have a very simple view hierarchy: here are the 2 versions:
version that works
android.widget.RelativeLayout
android.widget.TextView
com.iain.camera.CameraView (1) => extends SurfaceView
com.iain.graphicbase.GlSurface (1) => extends GLSurfaceView
version that blanks the camera preview
android.widget.RelativeLayout
android.widget.TextView
com.iain.camera.CameraView (1) => extends TextureView
com.iain.graphicbase.GlSurface (1) => extends GLSurfaceView
rather hacked about code with working version active and textureview
version commented out attached