0

Hello I worked on a GLTextureView to display an alpha video, but because of the alpha channel I setted

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

I tried a first time with a GLSurfaceView but the problem was that it needed a setZOrderOnTop(true)to show it and the view wasn't anymore attached to it's container (which is a zoomView). A TextureViewis better but now I've my video in a hole rectangle on my container sadly!

enter image description here

Source: enter image description here

wantedenter image description here

--[EDIT]--

Here some exemple :

enter image description here

On top it's an GLSurfaceView with an alpha video and down a custom GLTextureView, both are in an horizontalView. Top appears to be good as I want! But check this when I scroll to right: enter image description here

Top still appear when bottom hide as it needed!

Thibaud Renaux
  • 280
  • 1
  • 17
  • What is an "alpha video"? What is the behavior you're seeing, and how does it differ from what you're trying to achieve? What is the source for your GLTextureView class? – fadden Jan 07 '16 at 17:03
  • An alpha video is a video that just a part need to be shown , the rest of it need to show the content behind. It's like recording a video on a green screen and match this color to transparent to make an incrustation of our content in front another content. the example shown in the question should be as the person is shown over the blue square and the part between the person and the blue should be blue! I add some picture to explain – Thibaud Renaux Jan 07 '16 at 17:15
  • the source of the texture view is https://gist.github.com/eleventigers/9545428 – Thibaud Renaux Jan 07 '16 at 17:20
  • @fadden I added some pictures and explanations – Thibaud Renaux Jan 11 '16 at 09:30
  • So are you saying that what you want is to have a combination of both, the top and the bottom? You wish for the video to display top most view as a background as is on the top part but you also wish the view would be cut off when it slides off the top view as is in the bottom part? – Matic Oblak Jan 11 '16 at 09:49
  • Yes @MaticOblak, In fact these two last pictures are in a test example. In my real app, it's not an `HorizontalView`but a `ZoomView`. I need my alpha video to be shown with zoomview transformation and without the hole. – Thibaud Renaux Jan 11 '16 at 09:53
  • Seems strange this had happened to you. The top view is cut out but the bottom is not... Could you just try to add the GL view to yet another view which is transparent. – Matic Oblak Jan 11 '16 at 10:04
  • All my objects (alphas videos and other objects contained in ZoomView) are dynamically generated. When I use the Surface I need setZOrderOnTop to show it, but no more linked to Parents view. And with texture one, displayed and linked but in a hole. I there another configuration of the shader or the GLContext to avoid these problems? – Thibaud Renaux Jan 11 '16 at 10:08
  • Have you tried what I said above? Since your view clears out its parent view but not the parent's parent it might be enough to simply add another view in the hierarchy which will be cleared but its parent (currently the one that is cut out) might not be. – Matic Oblak Jan 11 '16 at 11:13
  • I didn't understand, in background the camerasurfaceview, in front of it my scrollview and where do you want I put the alpha video? – Thibaud Renaux Jan 11 '16 at 13:39
  • Video view should have a superview which has a superview of a type of scrollview. So scrollview has a view which has an openGL view. Instead of putting an openGL view directly on the scroll view try putting another view on the scrollview which contains on openGL view... – Matic Oblak Jan 11 '16 at 21:12
  • I tried surrounding my videoTextureView in two level of frameLayout, nothing changed :/. I read a lot about surface/texture View, for surfaces there is some graphics calculations and blend between these objects. – Thibaud Renaux Jan 12 '16 at 08:24

0 Answers0