libgdx AssetManager update() causes intermittent frame hitches during asynchronous texture loading
0 reputation · 26 Apr 2021, 06:14 UTC
Goal: determine whether calling AssetManager.update() every render frame causes intermittent frame hitches while large textures load asynchronously in a libgdx desktop application.
Constraints and uncertainty: AssetManager performs incremental decoding on the OpenGL context thread when update() is invoked, but per-frame cost depends on asset size, backend, and libgdx release. finishLoading() would block the render thread and is unsuitable during active gameplay. The core API lacks per-asset completion callbacks, so completion must be inferred from getProgress(). It is unclear whether spreading update() across frames removes hitches or only redistributes them, and whether desktop LWJGL3 context behavior affects the result.
Questions: Which render-frame budget is safe for AssetManager.update() before a visible hitch occurs? Should large textures be loaded on a dedicated loading screen instead of incrementally during gameplay? Does getProgress() reliably indicate when a specific texture is safe to bind without stalling?