Search code examples
androidopengl-escocos2d-android

Android Graphics Memory Limits


I am creating an android game using opengl and a cocos2d port (http://code.google.com/p/cocos2d-android-1). I am targeting a wide range of devices and want to ensure that it performs well. I only test on a nexus one and am hoping to get some input from people with experience on slower devices.

Currently the game uses two 1024x1024 textures as well as two 256x256 textures. Is this within the limits of most devices? Anyone have any rule of thumb or experience with graphics memory limits in these cases? If gfx memory is exceeded does it page to normal memory?


Solution

  • Afaik the Memory Limits for textures are the same as the memory limits of your app, which is 16 megs in most situations I believe, although it might be all available phone memory that's accessible.

    I've loaded MUCH more than this into my apps before I ran into problems, at least one 2048x2048 texture and several 512x512 textures, all 8888 in memory.

    I've never had a oom error on texture binding, only on loading bitmaps, so I hope that helps.