- February 2, 2013 at 6:09 pm #31125
I upgraded to v3.0 of the Mac PVR tools today, previously I was using an older version of the GUI PVRTexTool that ran in X11.
Since the upgrade, I haven’t been able to get the iOS Simulator (using GLKit, which is OpenGL ES 2.0) to load any of the textures I’ve generated using either the new GUI PVRTexTool, or the command line tool – It always fails with GLKTextureLoaderErrorDomain Code 12, which is ‘GLKTextureLoaderErrorDataPreprocessingFailure’ according to the documentation. Ideally, I’d really like to move to using the command line tool so I can automate this.
I assume I’ve just got the settings for generating the image wrong. What I want is an uncompressed RGBA8888 texture with a full mip map chain. My source image is a POT (2048*4096) PNG image.
This is what I think I need to pass to PVRTexToolCL based on the documentation:
/Applications/Imagination/PowerVR/GraphicsSDK/PVRTexTool/CL/OSX_x86/PVRTexToolCL -i Resources/input.png -o Resources/output.pvr -f r8g8b8a8,UB -m
When I run this it generates a file I can open in the GUI texture tool, but it can’t be read by the GLKit texture loader, failing with the error above. It does say ‘Compressing…’ even though I don’t want to use PVRTC, but I assume this is just a generic message. I’ve tried playing with the other options, premultiplying the image, flipping it in the y-dimension, but no luck. The same source image saved with what I think were the same settings using the older PVR tools worked fine.
I’m sure I’m just missing something obvious, I’d be very grateful for any suggestions on where I’m going wrong.
BenFebruary 2, 2013 at 9:55 pm #36594
Ok, I figured it out – it looks like the -legacypvr option was what I needed.February 11, 2013 at 10:26 am #36595
Yep that’s accurate, sounds like you’ve figured it out but for the benefit of anyone else looking at this – we moved to PVR v3 files in release 2.10, which are not yet supported everywhere. There are legacy save options in the GUI and command line tools to aid this transition stage as you’ve discovered. There’s an FAQ item about it here: http://forum.imgtec.com/discussion/2395/why-did-we-move-to-a-new-pvr-file-format-v3