2

as the title already says how much memory can I allocate for textures in opengl for Android 2.3 ?

I would like to know this as I didn't see any real number regarding this anywhere. I allocated on a galaxy tab up to 96 MB successfully for dozens of textures but after 96 MB rendering is slowing down to an extreme crawl. I use the same algorithm for the tests and only increase the allocated textures but the rendering performance above 96MB is less than 5% of what it is with 96 MB or less.

Is there a reason for this ?

Is this for all android 2.3 devices or is there a difference between them ?

How much memory can I safely allocate for opengl textures for most 2.3 and above android devices ?

Thanks in advance...

Jave
  • 31,598
  • 14
  • 77
  • 90
HardCoder
  • 3,026
  • 6
  • 32
  • 52

2 Answers2

1

96 MB is a lot of texture data, you should see if you can decrease that a bit.
Anyway, here is a post from earlier today about texture sizes and limitations.

You can get a lot of information on individual devices on glbenchmark.com.
You should also take a look on the android docs on openGl.

Community
  • 1
  • 1
Jave
  • 31,598
  • 14
  • 77
  • 90
  • 96 Mb is really not that much, especially when you have a device with 1gb memory and want to make use of just a fragment of it. Thanks for your links, but etc1 texture compression is out because I use alpha and glbenchmark has nothing about total maximum texture memory. – HardCoder Dec 20 '11 at 13:42
  • Not really, but considering that the system must take weaker systems into consideration (256 MB shared ram?) and also how much you get out of 96 MB (>20 1k textures on a screen that might not have a higher resolution than 800*480 is a bit overkill). But then again, if you are targeting tablets it makes more sense. – Jave Dec 20 '11 at 13:48
  • Also, I took a look at your profile, you should accept some of the answers to your questions if they solved your problem, so they get 'closed'. – Jave Dec 20 '11 at 13:50
  • Well for a visually appealing app you need lots of gfx for all kinds of animations and I do not consider 100mb to be too much for 800x480 where most recent 2.3 devices have at least 512mb of memory. – HardCoder Dec 20 '11 at 17:50
  • True, but as I have an education in, and work with design and graphics in addition to the programming and development I do I also know that it most often is possible to optimize the graphics, if you just know how to do it. Texture sizing seems to be a very usual problem. But there are also a lot of tricks you can do to save memory. – Jave Dec 20 '11 at 20:25
  • Of course I could save some memory here and there but the point is that it takes alot of time to optimize and I could *maybe* save 20-25% which on the other hand would make it harder to create and edit the textures because I'd always have to compress them or put them into atlases, etc... I'd rather save all that development time and inconveniences and focus on the content than squeezing these miniscule amounts of memory out of my code. I mean, its almost 2012, most hardware has 1Gb of memory...so why not use 100-150Mb for 1 big app from it ? That should not be too much to ask for, right ? :-) – HardCoder Dec 20 '11 at 20:33
  • You are right, but for Android the problem is that they have to support every kind of device that uses the system, including the older ones. GLES is also not bound to Android and have to support even more devices in which the hardware might be even worse. And finally there's the GPU manufacturer that has to squeeze out as much power as possible with as little battery-use and cost as possible. Considering all this, I think that todays phones possible limits are fully acceptable. The memory limit of the GPU is in the end Device-dependent. – Jave Dec 20 '11 at 20:40
  • "The memory limit of the GPU is in the end Device-dependent" exactly and thats why I asked with my initial question "How much memory can I safely allocate for opengl textures for most 2.3 and above android devices ?" for a certain kind of "guesstimate" or even official reference that I know what to aim for. As far as I've learned from browsing the net until now is that this seems to be a well kept secret (or at least often ignored issue) for each device. I learned that the galaxy tab seems to use 96~ish mb for shared video memory and that mirrors my results why performance dies after that. – HardCoder Dec 20 '11 at 21:56
  • Indeed. I hope you find something. – Jave Dec 20 '11 at 22:26
1

This limitation depends on gpu hardware. There is a lot of limitation on gpu to OpenGL. You should design for this restrictions.

yerlikayaoglu
  • 344
  • 3
  • 11
  • 1
    And what exactly are those restrictions ? Do you know a place where I can find more information regarding that ? – HardCoder Dec 20 '11 at 18:55
  • You should search gpu specifications which you use for opengl. For example: http://www.nvidia.com/object/product-geforce-gts-450-us.html – yerlikayaoglu Dec 21 '11 at 10:18