Cocos2DXNA / cocos2d-xna

XNA Port of Cocos2d-X
www.cocos2dxna.com
227 stars 123 forks source link

DumpTextureCacheInfo always assumes 32 bit textures #426

Closed totallyeviljake closed 10 years ago

totallyeviljake commented 10 years ago
            if (texture != null)
            {
                var bytes = texture.Width * texture.Height * 4;
                CCLog.Log("{0} {1} x {2} => {3} KB.", pair.Key, texture.Width, texture.Height, bytes / 1024);
                total += bytes;
            }

Note the "multiply by 4" in the bytes calculation, which is incorrect if the texture is a 16-bit DXT compressed image.

totallyeviljake commented 10 years ago

Fixed