android - 无法在 Cocos2d for android 上设置 PixelFormat

标签 android cocos2d-android

我正在尝试使用该函数设置渲染格式 CCTexture2D.setDefaultAlphaPixelFormat(Bitmap.Config.ARGB_8888);

但它给我一个错误

找不到符号方法 setDefaultAlphaPixelFormat(android.graphics.Bitmap.Config)

谢谢

最佳答案

给你,在你设置 View 的地方添加这个 对于 32 位

 mGLSurfaceView = new CCGLSurfaceView(this);    
 mGLSurfaceView.setEGLConfigChooser(8,8,8,8,0,0);
 mGLSurfaceView.getHolder().setFormat(PixelFormat.TRANSLUCENT);
 setContentView(mGLSurfaceView);

关于android - 无法在 Cocos2d for android 上设置 PixelFormat,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9666704/

相关文章:

android - Picasso 和 PhotoView Library 将图像加载到 ImageView 中很奇怪

android - Cocos2d android 中的动画 Sprite

android - 有人在 Cocos2d-android 中以更高分辨率运行他们的游戏吗?

android - 使用自定义适配器的 ListView 中的复选框刷新问题

android - 如何在共享首选项中存储数组列表并在另一个 fragment 中访问

android - 用户注销 React Native 应用程序时如何删除 Firebase 云消息传递 token ?

android - 如何以编程方式关闭 SearchView?

compilation - cocos2dx3.10 android 编译错误

使用 Cocos2d lib 进行 Android 游戏开发

android - 适用于 Android 游戏开发的 Cocos2D 或 libgdx