sourcemars / cocos2d-android-1

Automatically exported from code.google.com/p/cocos2d-android-1
0 stars 0 forks source link

Cannot load PVR texture #95

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Create a CCTMXTiledMap with a PVR texture
2. The CCTMXTiledMap is parsed correctly
3. CCTextureCache createTextureFromFilePath is called with the PVR texture path

What is the expected output? What do you see instead?
Bitmap bmp = BitmapFactory.decodeStream(is, null, opts); of CCTextureCache 
createTextureFromFilePath returns a null bitmap, which causes 
((CCTexture2D)res).initWithImage(bmp); to fail with an NullPointer as bmp is 
null.

Expected is creation of a CCTexture2D from the PVR texture.

What version of the product are you using? On what operating system?
Aug 11 git revision (a46abe93152f34c1b0a7aa93a806a633533b3cd4)

Please provide any additional information below.

I'm not sure how the PVR texture is supposed to be handled. I'm not sure if the 
intention is the BitmapFactory read in the PVR texture. The PVR texture class 
reads in data with a different method, but the comments on CCTextureCache say 
PVR is supported. 

Original issue reported on code.google.com by marksn...@gmail.com on 29 Aug 2011 at 7:30