Jump to content
  • Advertisement
Sign in to follow this  
IceCave

OpenGL Where and how are textures saved?

This topic is 1426 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi,

 

I am using OpenGL (ES) 4.X (3.X) and the Android OS.

Something I never understood was how textures are exactly saved in the RAM or if they are even saved there.

What really grinds my gears is when I am loading and displaying (stress testing) 256x "1024x1024 ARGB8888" textures on my smartphone gpu (Mali 400).

 

In theory that should never work because this is 1GB of data... I don't know how much VRAM a Mali-400 GPU has (propably none) but even my SGS3 has only 1GB RAM at all.

 

Can anyone enlighten me what exactly happens with those textures?

 

Thanks

Ice

Share this post


Link to post
Share on other sites
Advertisement
I'm not sure, but can smartphones swap out memory to flash?

In OpenGL, textures are stored in system memory by the driver and optionally in video memory (if it exists). Usually, all textures that you are using should reside in the faster video memory, and usually the driver will see to that if the textures are used. Even when the textures are stored in video memory, some implementations (used to?) keep the copy in system memory in case the OS needs to cannibalize the video memory all of a sudden.
In your case, I could imagine that the driver swaps out some textures to the flash memory as part of the regular swap file/partition and rotates, which ones are in flash and which ones in memory. Can you scale your test from 1 texture to 256 textures and measure the frame times, just to see, if for some amount of textures there is a sudden performance drop?

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!