Texture virtualize delete

Started by kkl, November 07, 2015, 03:58:44 PM

Previous topic - Next topic

kkl

Hi egon,

Is it possible if you could add delete feature for texture that is virtualized to memory card? Or add delete when textureManager.unload() is called.

Reasons to have this:
1. In live wallpaper, there are occasions where only required textures are loaded, based on user settings in preference.  To avoid loading all textures during app startup (which can be slow),  only one required texture is loaded.
2. Virtualizer.cleanUp() can't be used as it will clean all other textures which are still in use. It also cleans up the shared texture from other Wallpaper instance too.
3. To save storage. Live Wallpaper context is always persistent and never close unless user select other live wallpaper. When new texture is virtualized, it seems like jpct will save another texture in memory card, even if the same texture id but different object is saved before, CMIIW.

EgonOlsen

I'll check how it handles clean up and see what I can do about it.

EgonOlsen

This version adds a deVirtualize(<Texture>) method to the TextureManager. Please give it a try: http://jpct.de/download/beta/jpct_ae.jar