1

I am working on an app using LibGDX, and I am tackling some of the various issues that result from context loss when the user leaves the app and returns to it. In general, this is not much of a problem, but throughout the use of the app I occasionally build custom textures in the app itself to use in a couple different areas.

These textures absolutely must be preserved for when the user comes back in to the application, but I am not sure what the best approach for doing so is. So, simply, what is the proper way to preserve a texture that cannot simply be loaded back in when it is needed?

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
Shamrock
  • 436
  • 1
  • 8
  • 17
  • There is no one "proper" way i guess. It depends on your application. Either you save it to disk, or you keep some information in your app to reconstruct it when user comes back (doesnt work if app is destroyed). Have a look at this analysis http://www.badlogicgames.com/wordpress/?p=1073 May be you can give us additional details if you need further analysis! – aacotroneo Dec 15 '12 at 19:14
  • Here are a few links that may help you. http://stackoverflow.com/questions/14803783/how-to-reload-libgdx-unmanaged-texture-after-opengl-context-loss?rq=1 http://stackoverflow.com/questions/14906559/libgdx-saving-textures-to-avoid-context-loss?rq=1 http://code.google.com/p/libgdx-users/wiki/Screenshots – Jeremy Scoggins Sep 05 '13 at 13:05

0 Answers0