Error

C++博客 首页 新随笔 联系 聚合 管理
  217 Posts :: 61 Stories :: 32 Comments :: 0 Trackbacks
说明:此问题只出现在cocos2d-x 3.0和3.1.0版本上,3.1.1已经将此bug修复 
         不知为何,看了代码,appActivity.jave 继承了Cocos2dxActivity.java在OnCreatView()函数中,新创建了一个view,在init中新创建的view调用了 
         this.mGLSurfaceView.setEGLConfigChooser(8 , 8, 8, 8, 16, 0);  
         似乎重置了参数,所以我们在AppActivity.java 中重构public Cocos2dxGLSurfaceView onCreateView()函数 
         改写为 
         public Cocos2dxGLSurfaceView onCreateView(){ Cocos2dxGLSurfaceView glSurfaceView = new Cocos2dxGLSurfaceView(this); glSurfaceView.setEGLConfigChooser(5, 6, 5, 0, 16, 8);  return glSurfaceView; } 


int Application::runEx()
{
PVRFrameEnableControlWindow(false);
// Main message loop:
LARGE_INTEGER nFreq;
QueryPerformanceFrequency(&nFreq);
QueryPerformanceCounter(&_nLast);
initGLContextAttrs();
posted on 2014-12-16 23:42 Enic 阅读(290) 评论(0)  编辑 收藏 引用

只有注册用户登录后才能发表评论。
网站导航: 博客园   IT新闻   BlogJava   知识库   博问   管理