未命名 3

Posted on 2013-08-13 18:49  Flex/AS Programmer  阅读(243)  评论(0编辑  收藏  举报

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);即可

Copyright © 2024 Flex/AS Programmer
Powered by .NET 8.0 on Kubernetes