Author Topic: Texture virtualize delete  (Read 1733 times)

Offline kkl

  • float
  • ****
  • Posts: 291
    • View Profile
Texture virtualize delete
« on: November 07, 2015, 03:58:44 pm »
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.

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: Texture virtualize delete
« Reply #1 on: November 08, 2015, 11:56:17 am »
I'll check how it handles clean up and see what I can do about it.

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: Texture virtualize delete
« Reply #2 on: November 09, 2015, 09:51:57 pm »
This version adds a deVirtualize(<Texture>) method to the TextureManager. Please give it a try: http://jpct.de/download/beta/jpct_ae.jar