Game Development Community

What does compressPVR do?

by Joe Virgin · in iTorque 2D · 02/12/2010 (3:33 pm) · 5 replies

I'm using T2Di 1.3 and I'm trying to get PVRs to work. I've compressed them using the included PVRTC tool for Windows (alternatively I've compressed them on a Mac). But once I put them into the game (and deleted the pngs), the game does not use them. Alternatively, I've tried to use the compressPVR flag with absolutely no change in performance. What does the compressPVR flag do? Does the optimised flag automatically use it?

About the author

Joe Virgin is a programmer for Plainvue Software, Inc., a company producing iPhone games that teach math skills to the youth. Check out Fraction's Kitchen Lite, Fortune's Prime, and Chainshooter powered by iTGB and now available on the App Store.


#1
02/12/2010 (4:29 pm)
the flag is unneeded.
All you need to do is put it in the same place as the uncompressed (same name but different file extension). on the iphone and simulator it will then use the pvr if it finds it.

on the desktop computers it will never use pvr as pvr is not supported there
#2
02/12/2010 (5:41 pm)
So you have to have the png (or uncompressed image) with the pvr in order for it to work? How do you know if it is using the pvr file?
#3
02/12/2010 (7:53 pm)
On the pc/mac you need the png present.
On the iphone / simulator its not needed.

So if you cut the png on the iphone (in the xcode project in the resources by removing their references) you can simply test it after a relink
#4
02/16/2010 (3:24 am)
also make sure you dont reference the actual file extension.

image = "myPicture.png" will ALWAYS look for the png, it will never attempt the PVR.

use :

image = "myPicture";

that will look for PVR, then png, then jpg/bmp/etc.
#5
02/16/2010 (2:53 pm)
Thanks Sven, that's what I was missing.