2013-03-17 136 views
1

我目前正在與Andengine,GLES1一起開發遊戲,並且在我的其中一臺設備上發現它運行非常慢,(大約15 FPS)。爲了改善這一點以及使用SpriteGroup,我已經將背景圖像轉換爲RGB_565。因此,舉例來說,在AndEngine中使用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,

Original Image RGB_565

(第一圖像上的黑色矩形是一個廣告我阻止了!)。 有沒有我省略的東西?我會很樂意爲此提供任何幫助。提前致謝。

回答

1

道歉,看來這是記在我自己的無知是關於圖像格式:$

我已經離開了質詢,但以防萬一有人徘徊相似。我使用紋理打包器,它給了我一個紋理格式選項(png),同時還有一個圖像格式(RGB565),所以我認爲RGB565是沒有alpha的png縮小版。雖然尋找到我的問題,我碰到這個,

How to convert 32 bit PNG to RGB565?

而這一點,

Why there is .pvr file in OpenGL(IOS)

我現在明白了,PNG和RGB565卻大不相同!