I am trying to overlay a SurfaceView with a GLSurfaceView using OpenGL ES 2.0, so I need to set a transparent background in the GLSurfaceView.
After looking for solutions on the internet, I have found that this code normally do the job...
In the SurfaceView:
mGlSurfaceView.setZOrderOnTop(true);
mGlSurfaceView.getHolder().setFormat(PixelFormat.RGBA_8888);
mGlSurfaceView.setRenderer(mRenderer);
mGlSurfaceView.setRenderMode(GLSurfaceView.RENDERMODE_WHEN_DIRTY);
mGlSurfaceView.requestRender();
And in the renderer:
GLES20.glClearColor(0.0f, 0.0f, 0.0f, 0.0f)
The glSurfaceView overlay the other views, but it is still opaque. I have tried anything I variant of these calls plus some others that have solved the problem for other people, but it doesn't work for me.
Thank you