public Cocos2dxGLSurfaceView onCreateView() { Cocos2dxGLSurfaceView glSurfaceView = new Cocos2dxGLSurfaceView(this); glSurfaceView.setEGLConfigChooser(5,6,5,16,8); return glSurfaceView; }
经过多此测试可以实现。
网上有人做过测试对于性能的影响如下:
- //glSurfaceView.setEGLConfigChooser(5,8);//fps:56
- glSurfaceView.setEGLConfigChooser(8,16,0); background-color:inherit">0);//fps:41
同样在设置属性时可以设置对应的模式
glSurfaceView.setEGLConfigChooser(5,8); getHolder().setFormat(PixelFormat.RGB_565); glSurfaceView.setEGLConfigChooser(8,8,0); getHolder().setFormat(PixelFormat.RGBA_8888);
原文链接:https://www.f2er.com/cocos2dx/344250.html