cocos2dx 实现遮罩
2024-08-29 00:44:51
参考博文: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;
- }
- }
最新文章
- Understanding glibc malloc【待译】
- ArcGIS10.1 发布气温插值GP服务
- AngularJS 日期转换字符串
- debug note-- nginx php-fpm : Error:The page you are looking for is temporarily unavailable.
- 【原创】基于Memcached 实现用户登录的Demo(附源码)
- ActionResult,PartialViewResult,EmptyResult,ContentResult
- POJ 1182 食物链(种类并查集)
- [React Testing] The Redux Store - Multiple Actions
- Js获取Gridview中Dropdownlist选中状态
- CocoaPods on Xcode 6 and Yosemite
- windows利用iis配置反向代理实现ECS内网互通oss
- 修改was数据源
- Java框架spring 学习笔记(十五):操作MySQL数据库
- [Deep-Learning-with-Python]GAN图片生成
- sqlserver 模糊查询,连表,聚合函数,分组
- Mapnik初学笔记
- 路遥眼里的河南人<;平凡的世界>;
- sql server数字转字符串出现科学计数法
- 211. String Permutation【LintCode by java】
- for...of 与 for...in 区别