About Store Forum Documentation Contact



Post Reply 
Giant Memory usage on Mobile
Author Message
Pherael Offline
Member

Post: #1
Giant Memory usage on Mobile
Hi, I using this code to show memory usage of textures:
Code:
Long size=0; REPA(Images)size+=Images.lockedElm(i).data.memUsage();
   D.text(Vec2(-1, -0.6), S+size);
On my desk computer I got in result about 25 MB, on mobile (Android) about 120 MB. It's same program, same code, same textures.

I know there is difference with Image format on different platforms, but difference with memory usage is gigantic. Is any way to change that?
(This post was last modified: 05-22-2014 04:01 PM by Pherael.)
05-22-2014 03:59 PM
Find all posts by this user Quote this message in a reply
cmontiel Offline
Member

Post: #2
RE: Giant Memory usage on Mobile
Reduce mip maps (I don't use mip maps for GUI textures).
Compress some images (pvr or etc).
Use atlases.
Optimize, loading only required images in each state.
Carefull with images bigger than 1024x1024.

Anyway, I am getting 100mb+ on android/ios devices too, just like you. I don't know the reason, maybe is because opengl needs power of 2 textures and they are reescaled internally, using more memory.
(This post was last modified: 05-22-2014 05:00 PM by cmontiel.)
05-22-2014 04:39 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #3
RE: Giant Memory usage on Mobile
Most probably because your GPU does not support DXT5 and needs to be decompressed to full RGBA8.
I use ETC1 where possible, but if your texture has alpha then it's stored as DXT5.
05-24-2014 02:16 AM
Find all posts by this user Quote this message in a reply
Post Reply