简体   繁体   中英

OpenGL transparent background Xamarin

I'm building an application who stream the content of the camera on the screen. Now I want to add a OpenGL element on the screen. My OpenGL element is an arrow that I create in a other class, that inherit GLKView call TriangleView. My ViewController is a GLKViewController. I add my Triangle View like this

View = triangleView = new TriangleView (View.Frame);

That draw my GLKView, but I would like to have a transparent background for this GLKView in order to see my camera stream. I'm beginning in OpenGL so I don't really know how to do that. I found some post that say to put an alpha on it GL.ClearColor (1.0f, 0f, 0f, 0f); ,in the Draw function of my GLKView, but this doesn't work.

Any help or comment is welcome.

Thank in advance

您可能还需要将GLKView的opaque属性设置为NO,以便可以进行Alpha混合。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM