LayerColor在小米手机与三星手机上丢失透明通道问题

使用的cocos版本是3.2,VS调试下显示正常,但是在小米与三星的真机上测试LayerColor设置的透明度无效了,颜色也有问题,代码如下

auto colorLayer = LayerColor::create(Color4B(0x00, 0x00, 0x00, 0xC0));

auto clippingNode = ClippingNode::create();  
this->addChild(clippingNode);
clippingNode->setInverted(true);
clippingNode->addChild(colorLayer);

float radius = 265.f;
const int nCount = 200;
const float angel = 2.f*(float)M_PI/nCount;
static Vec2 cicle;
for (auto ii = 0; ii < nCount; ++ii)
{
    float radian = ii*angel;
    cicle.x = radius*cosf(radian);
    cicle.y = radius*sinf(radian);
}

auto action = RepeatForever::create(Sequence::create(ScaleTo::create(1.f,0.85f),ScaleTo::create(1.f,1.f),nullptr));
auto stencil = DrawNode::create();
stencil->drawPolygon(cicle,nCount,red,0,Color4F::BLACK);
stencil->runAction(action);
stencil->setPosition(Vec2(m_Pos.x,m_Pos.y+20));
clippingNode->setStencil(stencil);

可否贴一张正常情况下得图吗?

找到解决方法了,在java中添加如下代码就没问题了
package org.cocos2dx.cpp_tests;

import org.cocos2dx.lib.Cocos2dxActivity;
import org.cocos2dx.lib.Cocos2dxGLSurfaceView;

public class AppActivity extends Cocos2dxActivity {

public Cocos2dxGLSurfaceView onCreateView() {
    Cocos2dxGLSurfaceView glSurfaceView = new Cocos2dxGLSurfaceView(this);
    // TestCpp should create stencil buffer
    glSurfaceView.setEGLConfigChooser(5, 6, 5, 0, 16, 8);
    
    return glSurfaceView;
}

}

MARK
.:14::14::14: