在某些版本的android上,用了ClippingNode产生白屏,后来参照cpp_tests改了AppActivity才解决问题。
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;
}
}
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;
}
}
==============
AppActivity在cocos2dx3.2版本指的是:cocos2d-x-3.2 ▸ cocos2d-x-3.2 ▸ cocos ▸ platform ▸ android ▸ java ▸ src ▸ org ▸ cocos2dx ▸ lib 下的Cocos2dxActivity.java