Game Development Community

PVR Sprite Sheet Error on iPhone

by Carl Schell Work · in iTorque 2D · 03/11/2009 (1:37 pm) · 6 replies

I am attempting to use a PVR in place of a PNG that I am using in the game as a CELL format ImageMap. When I run my test level on the iPhone with only a PNG in the images directory, it shows up perfectly fine in the level. But, when I put a PVR image in the directory, and the game uses it the next time I run it, I get this error on the iPhone:

../../source/dlg/gBitmap.h @ 187
GBitmap::getWidth: mip level out of range

Now, I can't see the full error because the msgBox on the iphone won't let me scroll down, but I think that it is "out of range (0,0)", but I am not sure. Anyway, I have tried PVR files with Mips and without Mips, but both give me this error IF I am using it as a CELL imageMap. If I am using it as a FULL imageMap, it works just fine.

Is it ok to use CELL with PVR?

#1
03/11/2009 (2:26 pm)
It should be, try setting only the top-level mip-map and see if that works.

Also, if you are debuggin from XCode, you should be able to see the error messages from the GDB output windows (as well as anything else in the console log)
#2
03/11/2009 (8:31 pm)
Carl, I get the same exact error message and I've tried numerous renditions to no avail. There is definitely a bug in iTGB.

Mat, please let us know what you do to get it to work, since you seem to suggest that it does. Maybe give us an example that works so that we have a baseline. If you could provide a pvr image, a png image that we can use (to practice making the same PVR image) as well as the datablock that uses CELL. That would be sweet!

Thanks!
#3
03/12/2009 (5:47 am)
I agree with Ray, I have tried only Top Level Mips, All Mips, One Mip...they all give the exact same error. It seems pretty important to be able to use the PVR format so Mat, if you have gotten it to work, please point us in the right direction.

Thanks!
#4
03/12/2009 (10:30 am)
As an update to this thread. With my original post, I was using the PVRTexTool on the PC. I have just tried using the texturetool on the mac, and I no longer get this error, BUT, the image does not show up at all, I only see a black screen. I tried all of the different formats to try and get the image to display, but no luck.

Any further help would be great.

Thanks!
Carl


#5
03/12/2009 (11:20 am)
@Carl
check this link

http://www.garagegames.com/community/forums/viewthread/85681/

It's a known iTGB bug, I do hope you put this on your "Things to fix for 1.2 list" Mat. So officially there are five people that has/had this problem, me, Carl, Ray, Dave, Daryll. I don't know if Marc experienced it too.

Use Apple's official inferior PVR tool, because you know, that's what Apple recommends instead of the fancy shmancy one in Windows.

Mac -> iPhone

NOT

(Mac or Windows) -> iPhone

#6
03/12/2009 (2:49 pm)
I did not test it any further after the initial problems with getting PVR to work at all.

I worked through my performance and core capability test set only.
Those test sets show me if what I want to happen is realistically possible. The results showed, that iTGB is unusable for the intend project right now without some serious source work to fix the core problems in the rendering pipeline and ressource handling areas.