What size can textures be?

转之:http://www.cocos2d-iphone.org/wiki/doku.php/faq


There are two cases to consider, non compressed textures and PVRTC compressed textures.

For non compressed textures the textures must have power of two dimensions less than or equal to 2048 in 3rd gen devices (or newer) and 1024 in older devices.

So 16×256 is okay, 512×512 is okay but 240×320 is not.

You can still use an image that does not follow these rules but beware that it will be stored in a texture with power of two dimensions. So loading a 240×320 image will result in a 256×512 texture being created.

On newer platforms (such as iPhone 3GS) a maximum texture size of 2048×2048 is supported. Note that the maximum texture size for the iPhone 3G and lower is 1024 x 1024.

For PVRTC compressed textures the texture must have power of two dimensions and must also be square e.g 4×4, 32×32, 256×256, 1024×1024. The image that is loaded into the compressed texture is in a special format that closely matches the format stored on the GPU - consequently the image must also be a square with power of two dimensions. If you are using PVRTC compressed textures and your texture appears as solid white then one possible cause is that the image you are loading does not have square dimensions.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值