To be exact, even after GL context is lost, restoring GPU resources might fail since GPU might not be ready. Then, creating resources can fail. In this case, Ebiten should wait for GPU ready.
Reference: https://www.youtube.com/watch?v=NHVtLC5QOpo
If we could use Vulkan on Android and Metal on iOS, we could remove restoring logic. I think this is the way to go.
Most helpful comment
If we could use Vulkan on Android and Metal on iOS, we could remove restoring logic. I think this is the way to go.