doorxp

Blog

Cocos Creator opengles TRANSPARENT android

//android

修改包org.cocos2dx.javascript下AppActivity类

@Override

    public Cocos2dxGLSurfaceView onCreateView() {
        Cocos2dxGLSurfaceView glSurfaceView = new Cocos2dxGLSurfaceView(this);
        glSurfaceView.setEGLConfigChooser(8, 8, 8, 8, 16, 8);
        glSurfaceView.getHolder().setFormat(PixelFormat.TRANSPARENT);
        glSurfaceView.setZOrderOnTop(true);
        SDKWrapper.getInstance().setGLSurfaceView(glSurfaceView, this);
        return glSurfaceView;
    }


//js


//早期
cc.director.setClearColor(cc.color(0, 0, 0, 0));
最新
cc.Camera.main.backgroundColor = cc.color(0, 0, 0, 0);


发表评论:

Powered By Z-BlogPHP 1.5.1 Zero

Copyright doorxp.com Rights Reserved.