Android图形内存限制 [英] Android Graphics Memory Limits

查看:595
本文介绍了Android图形内存限制的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用opengl和cocos2d端口(http://code.google.com/p/cocos2d-android-1)创建一个Android游戏.我的目标是广泛的设备,并希望确保其性能良好.我只测试一个联系设备,希望能从有经验的人那里获得一些使用较慢设备的经验.

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.

当前,游戏使用两个1024x1024纹理以及两个256x256纹理.这在大多数设备的限制范围内吗?在这些情况下,有人对图形内存限制有任何经验法则或经验吗?如果超出了gfx内存,是否可以分页到普通内存?

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?

推荐答案

Afaik纹理的内存限制与应用程序的内存限制相同,在我相信的大多数情况下,内存限制为16兆,尽管可能全部可用可访问的手机内存.

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.

在遇到问题之前,我已经向应用程序中加载了更多信息,至少一个2048x2048纹理和几个512x512纹理,所有这些8888都在内存中.

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.

我从来没有在纹理绑定上出现过oom错误,而只是在加载位图时,因此希望对您有帮助.

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

这篇关于Android图形内存限制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆