Reputation: 2933
I'm messing around with PVRTexTool GUI, but only the uncompressed 32 bit texture is shown correctly by the app. I've tried so far all OpenGL ES 2.0 formats
and some OpenGL ES 1.0
...but some won't load and others are shown in black.
I'm loading the texture with this code
// load texture
CC3Texture* texture = [CC3Texture textureFromFile:@“my_texture.pvr”];
Upvotes: 0
Views: 1182
Reputation: 2933
The code to load the texture is ok, but not all formats generated by PVRTexTool are supported.
The supported formats using the commandline-tool are:
Command:
PVRTexToolCLI -i in.png -o out.pvr -f <format> [-q <quality>] [-m <numberofmipmaps>]
Options:
format
bits format Cocos2d Cocos3d transparency
32 R8G8B8A8,UBN y y y
16 R8G8B8,UBN y y n
16 R4G4B4A4,USN y y y
16 R5G5B5A1,USN y y y
16 R5G6B5,USN y y n
16 A8I8,UBN ? ? ?
8 A8,UBN y y y
8 I8 ? ? ?
4 PVRTC1_4 y * y
2 PVRTC1_2 y * y
4 PVRTC1_4_RGB y * n
2 PVRTC1_2_RGB y * n
4 PVRTC2_4 n n ?
2 PVRTC2_2 n n ?
? don’t know
* needs 9 mipmaps
y supported
n really :)
quality for PVRTC:
pvrtcfastest
pvrtcfast
pvrtcnormal
pvrtchigh
pvrtcbest
I'll update this table when needed
Upvotes: 3
Reputation: 2374
Have a look at the CC3DemoMashUpScene addSkyBox
method.
In there, you can uncomment the line that loads the Skybox.pvr
file. You'll also need to uncomment the line in the initializeScene
method that invokes the addSkyBox
method.
Skybox.pvr
is a cube-map texture, containing six compressed PVRTC 2bpp textures. You can use the PVRTexTool to open this texture and compare it to the textures you are trying to load.
Upvotes: 1