设置透明背景两个地方,首先:
mGLSurfaceView.setZOrderOnTop(true);
mGLSurfaceView.getHolder().setFormat(PixelFormat.TRANSLUCENT);mGLSurfaceView.setEGLConfigChooser(8,8,16,0);
然后在CCDirector.java中修改
public void setGLDefaultValues (GL10 gl)函数中
gl.glClearColor(0.0f,0.0f,1.0f);
改为gl.glClearColor(0.0f,0.0f);
ok,大功告成
原文链接:https://www.f2er.com/cocos2dx/342450.html