Quantcast
Channel: C++博客-所有随笔
Viewing all articles
Browse latest Browse all 7882

cocos2d-x3.0奇怪的,listview移植到Android出现的白屏问题

$
0
0
说明:此问题只出现在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();


Enic 2014-12-16 23:42 发表评论

Viewing all articles
Browse latest Browse all 7882

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>