未命名 3

android支持哪些opengl混合模式

我使用以下的混合模式在win32上可以正确运行,但在android上没有效果,android不支持这样的混合模式吗 ?
blendFunc.src = GL_ONE_MINUS_DST_ALPHA;
blendFunc.dst = GL_ONE;

问题解决:

Specifying the android.view.Surface
By default GLSurfaceView will create a PixelFormat.RGB_565 format surface. If a translucent surface is required, call getHolder().setFormat(PixelFormat.TRANSLUCENT). The exact format of a TRANSLUCENT surface is device dependent, but it will be a 32-bit-per-pixel surface with 8 bits per component.

在setRender之前调用setEGLConfigChooser(8, 8, 8, 8, 16, 0);
      getHolder().setFormat(PixelFormat.TRANSLUCENT);即可
原文地址:https://www.cnblogs.com/yssgyw/p/3255703.html