您的位置:首页 > 其它

What size can textures be?

2012-08-07 17:58 183 查看
转之: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.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  textures image iphone less
相关文章推荐