PDA

View Full Version : Android GLTextureView hole : unwanted blending



vincitux
01-12-2016, 05:22 AM
Hello,

I'm an OpenGL & OpenGL in Android beginner.
I'm working on an app that show some alphavideo using GL(matrix and color algorithm).
To display these videos added dynamically I use GLTextureView and these videos and other objects are added in a ZoomView which is above a CameraView.
The goal of the code is that an alpha video show its content and on the alpha parts we need to see the background of the ZoomView.
But at the current state of the code all videos views are blending themselves to the cameraview, I can't see the background of the zoomview , I just see the content of the cameraview behind the alphavideo.
In fact my wish is to have an alpha video as a dynamic PNG file which just be transparent where it needs and we can see the under content, not other Surface/TextureView on a more under layer.
Here is the GL configuration I use :


GLES20.glClearColor(0.0f, 0.0f, 0.0f, .0f);
GLES20.glClear(GLES20.GL_DEPTH_BUFFER_BIT | GLES20.GL_COLOR_BUFFER_BIT);
GLES20.glEnable(GLES20.GL_BLEND);
GLES20.glBlendFunc(GLES20.GL_SRC_ALPHA, GLES20.GL_ONE_MINUS_SRC_ALPHA);

And in my contructor:

setEGLConfigChooser(8, 8, 8, 8, 16, 0);
setEGLContextClientVersion(2);


Thanks by advance

PS: I tried with SurfaceView but the problem was that Surface needed setZorderOnTop(true) to be visible, and the changing of zorder unlink videos to the zoomview container and the linked transformations.