2

I'm doing some tests regarding loading of POT vs NPOT textures on OpenGL ES 2.0 iOS devices.

Surprisingly, NPOT textures (smaller in size) seem to take more memory than the next biggest POT texture. Can anybody explain why?

My test consists of a bare-bones App in which I load a really big texture (I'm using cocos2d, so this could be a bug in this engine). Then I output memory usage using this method. (I'm looking for a better way of reporting texture memory, see here).

The NPOT texture is 1010x1708 (3399 kB at RGBA4444). The equivalent POT texture is 1024 x 2048 (4096 kB at RGBA4444).

App usage using the POT memory usage stabilizes at a little over 1600000 bytes (I did three runs, with these values: 16261120, 16232448 and 16240640). The NPOT memory usage stabilizes at around 1900000 bytes (19173376, 19038208 and 19140608). Nothing else changes between runs, only the texture.

Why, oh, why? :-)


Note: I did these tests on iOS 6.1 (iOS 5 was known to have a bug which caused POT textures to take 33% more memory than NPOT ones.

Community
  • 1
  • 1
Ricardo Sanchez-Saez
  • 9,466
  • 8
  • 53
  • 92

0 Answers0