Skip to main content
June 19, 2012
Question

Is it possible to check the memory of GPU on Air?

  • June 19, 2012
  • 3 replies
  • 1229 views

When I added more and more textures to the "Starling" framework , iPad crashed at last.

But during those actions , the number "System.totalMemory" didn't increase any more.

So I think that it may be out of GPU memory.

Is it possible to check the memory of GPU on Aobe Air?

This topic has been closed for replies.

3 replies

Inspiring
June 19, 2012

I dont think that you can access these specific informations.

I do know, that if you allocate huge amounts of memory in short time, the devices are likely to crash.

Are you using the Texture Atlas?

Maybe you should divide your Textures into multiple Texture Atlases and load only what you need.

How much space do you use with your Textures? 20-30MB shouldn't be a problem so far.

June 20, 2012

Thanks for replaying.

Yes, I'm using the Texture Atlas.

It happens when I draw the flash.display.MovieClip and put those bitmaps into Texture Atlases.

Because this progress will cost a lot of time ,so I transplant all the assets before the game begain.......

I just want to know how can I get the size of all textures in memory? So we can decide how many textures we shall build later.....

Inspiring
June 20, 2012

A Texture of 2048x2048 will consume around 12MB in memory. 1024x1024 around 3MB. 512x512 around 0.75MB and so on.

It don't has to be only the size of your memory allocation that could cause the crash, if you do tons of allocation in short time, this could also be the cause.

I don't want to tell you how to do your coding, but i think you should change your approach of getting these textures inside a Texture Atlas. If its possible, try to create your Texture Atlas on your machine. Maybe you write a short class, that renders all your movieclips to Textures that are 2048x2048 and save them to the harddisk - so you just use this Textures later on without rendering your movieclips in your main program - thats what they are made for . With this approach you can also see how many of this Textures will be created and therefor - how much space in memory they will take.

The other way would be to use the memory profiler. It also profiles memory consumption of BitmapDatas.