Android Graphics Memory Limits

本小妞迷上赌 提交于 2019-12-03 08:03:35

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.

Java Apps are 16Mo (mdpi) or 24Mo (hdpi). But Native aren't and OpenGL Java API is only a JNI wrapper. So you can load on GPU more than 24Mo of texture. My experience was to limit Atlas at 512*512 at first (because G1 was slow on big textures) but today i use bigger atlas texture.

Our current games use 20-50 Mo of ram and use 2048*2048 textures.

Old post I know but nowadays your talking at least 128mb in the VM for available loading space on Bitmaps in memory using android java.

With textures you are loading outside the app space (c). So the loading limit is the same as the phones memory. (You'll notice on memory intensive games that the icons draw when going back to the home screen)

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!