Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/183.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 在AndEngine中使用RGB_565作为背景图像_Android_Andengine - Fatal编程技术网

Android 在AndEngine中使用RGB_565作为背景图像

Android 在AndEngine中使用RGB_565作为背景图像,android,andengine,Android,Andengine,我目前正在和安引擎GLES1一起开发一款游戏,我发现在我的一款设备上它运行速度非常慢(大约15 FPS)。为了改进这一点以及使用SpriteGroup,我将背景图像转换为RGB_565。那么比如说, mBitmapTextureAtlasBackground = new BitmapTextureAtlas(512, 512,BitmapTextureFormat.RGB_565,TextureOptions.DEFAULT); mBgRegion = BitmapTextureAtl

我目前正在和安引擎GLES1一起开发一款游戏,我发现在我的一款设备上它运行速度非常慢(大约15 FPS)。为了改进这一点以及使用SpriteGroup,我将背景图像转换为RGB_565。那么比如说,

mBitmapTextureAtlasBackground = new BitmapTextureAtlas(512, 
    512,BitmapTextureFormat.RGB_565,TextureOptions.DEFAULT);
mBgRegion = BitmapTextureAtlasTextureRegionFactory
    .createFromAsset(mBitmapTextureAtlasBackground, mActivity, 
    "backgroundgame1.png", 0, 0);
BackgroundSprite = new Sprite(0.0f, 0.0f, mCamera.getWidth(),mCamera.getHeight(), mBgRegion);
但是,图像如下所示,右侧的图像是wtih RGB_565

(第一张图片上的黑色矩形是我屏蔽的广告!)。
有什么我遗漏的吗?如果能在这方面得到任何帮助,我将不胜感激。提前感谢。

抱歉,这似乎是由于我自己对图像格式的无知造成的:$

不过,我留下了这个问题,以防万一有人也有类似的想法。我使用的是纹理打包器,它为我提供了一个纹理格式(png)选项,同时还有一个图像格式(RGB565),所以我假设RGB565是png的简化版本,没有alpha。在调查我的问题时我遇到了这个

而这个,


我现在明白png和RGB565确实非常不同

抱歉,这似乎是因为我自己对图像格式的无知:$

不过,我留下了这个问题,以防万一有人也有类似的想法。我使用的是纹理打包器,它为我提供了一个纹理格式(png)选项,同时还有一个图像格式(RGB565),所以我假设RGB565是png的简化版本,没有alpha。在调查我的问题时我遇到了这个

而这个,

我现在明白png和RGB565确实非常不同