AssetManager and OpenGL Texture Cache Interaction After Context Loss
0 reputation · 28 Oct 2023, 06:26 UTC
The goal is to clarify whether libgdx’s AssetManager should automatically handle GPU‑side texture invalidation after an OpenGL context loss, given that the manager currently retains CPU‑side references while the GL texture IDs become stale.
Constraints include the documented responsibility of the application to manage context loss on Android, the rarity of such events on desktop OpenGL, and the potential impact on existing user code that manually disposes and reloads assets. Uncertainty remains about the performance and API implications of adding an optional auto‑reload flag to AssetManager.
Should AssetManager provide an optional mechanism to detect context loss and reload textures automatically? What are the trade‑offs between automatic handling and explicit developer control? How would this feature coexist with current pause/resume patterns without breaking existing projects?