Maximum Texture memory limit

Hi guys,

Please help me out here :smiley:

I am building a game that uses multiple sprite sheets.

When I check memory in my level1.lua like this:

----------------------------- CHECK MEMORYlocal function checkMemory() collectgarbage( "collect" ) local memUsage\_str = string.format( "MEMORY = %.3f KB", collectgarbage( "count" ) ) print( memUsage\_str, "TEXTURE = "..(system.getInfo("textureMemoryUsed") / (1024 \* 1024) ) )endmemTimer = timer.performWithDelay( 1000, checkMemory, 0 )

I get the following initial results in Corona Simulator (which DO NOT significantly increase over time):
MEMORY = 421.074 KB (iPad Air)
TEXTURE = 44.424… (iPad Air)

MEMORY = 421.711 KB (iPhone 4)
TEXTURE = 15.375… (iPhone 4)

Questions:

  1. Texture value 44.424 is in what units (MB)?

  2. I read in Corona book that iPhone 3GS maximum texture permitted memory is 25MB.
    What are the maximum MEMORY (KB) and TEXTURE (MB) values I can count on when submitting my app to Apple?

Waiting your reply.
Many thanks! :smiley:
Ivan

The texture memory is measured in Megabytes.

The 3GS probably supported a 2048x2048x4 bites of memory, which is 16mb.  I doubt a phone that old supported larger texture sizes. It might have also been limited to 1024x1024x4 (4mb) images. Though I’m not sure how much you should worry about that device. Apple only supports three versions of iOS, the current one and two back, so the minimum iOS support is iOS 6 and I don’t think the 3G family can be upgraded past iOS 5.  Apple has been getting more aggressive with these rules too.

All iOS devices today as well as Android devices should support at least a 2048x2048 single texture size.  Now if your question what is the total about for all images, there isn’t a hard limit, but the OS generally takes up about 75% of the system’s memory.  The 3G family was limited to about 128mb of total RAM, so 32mb would be a practical limit on that.

Rob

Thank you Rob  :slight_smile:

Ivan

The texture memory is measured in Megabytes.

The 3GS probably supported a 2048x2048x4 bites of memory, which is 16mb.  I doubt a phone that old supported larger texture sizes. It might have also been limited to 1024x1024x4 (4mb) images. Though I’m not sure how much you should worry about that device. Apple only supports three versions of iOS, the current one and two back, so the minimum iOS support is iOS 6 and I don’t think the 3G family can be upgraded past iOS 5.  Apple has been getting more aggressive with these rules too.

All iOS devices today as well as Android devices should support at least a 2048x2048 single texture size.  Now if your question what is the total about for all images, there isn’t a hard limit, but the OS generally takes up about 75% of the system’s memory.  The 3G family was limited to about 128mb of total RAM, so 32mb would be a practical limit on that.

Rob

Thank you Rob  :slight_smile:

Ivan