I got this error when I try to load a PVR image on device. It works in iPhone 5s, 5, 4s and iPad well, but in 4 it doesn't work. My PVR image size is: width = 4096
and height = 2048
.
Cocos2d: cocos2d: TexturePVR: Error uploading compressed texture level: 0 . glError: 0x0501
Cocos2d: cocos2d: Couldn't load PVR image /var/mobile/Applications/7CF6C347-8B63-4C1E-857A-41F48C8ACBEF/Race.app/Images/BackGround/bg1.pvr.ccz
Cocos2d: cocos2d: Couldn't add PVRImage:Images/BackGround/bg1.pvr.ccz in CCTextureCache
I got this form this link:
Supported sizes are: iPhone 3gs / iPhone 4 / iPad 1 / iPod 3 / 4 : 2048x2048 iPad 2 / 3 / 4 / Mini / iPhone 4S / 5 / iPod 5 : 4096x4096
Btw, you can import texture at 4096x4096 and turn mip maps on, this would automatically use smaller resolution texture on older devices.
But how to turn on the mip-maps .. and what does this do?
// support mipmap filtering
sprite->getTexture()->generateMipmap();
ccTexParams texParams = { GL_LINEAR_MIPMAP_LINEAR, GL_LINEAR, GL_CLAMP_TO_EDGE, GL_CLAMP_TO_EDGE };
sprite->getTexture()->setTexParameters(&texParams);