参考博文:http://blog.csdn.net/myarrow/article/details/19913653
参考博文:http://blog.csdn.net/song_hui_xiang/article/details/22809647
强调一下Android部分有个错误的地方:
- public Cocos2dxGLSurfaceView(final Context context) {
- super(context);
- this.setEGLConfigChooser(5, 6, 5, 0, 16, 8); // 添加此句
- this.initView();
- }
如果按照博文里面的位置设置有些机型会启动不起来,直接crash。
应该放在:
- public abstract class Cocos2dxActivity extends Activity implements Cocos2dxHelperListener {
- public Cocos2dxGLSurfaceView onCreateView() {
- Cocos2dxGLSurfaceView glSurfaceView = new Cocos2dxGLSurfaceView(this);
- glSurfaceView.setEGLConfigChooser(5, 6, 5, 0, 16, 8);
- return glSurfaceView;
- }
- }
时间: 2024-11-14 12:36:56