when an android app is in the background the android os can clear its resources if its low on memory.
in my case its the glcontext
and gl resources that are getting lost and crash the app.
in order to not restart the app entirely i would like to identify that this event had happened and recreate Open GL
related resources.
i couldnt reproduce it / force this to happen.
my questions are:
does checking if eglGetCurrentContext() == EGL_NO_CONTEXT
is enough to know that the context was lost? or there is an other way of knowing it?
is there any way to reproduce this issue?
specs
the app logic is in c++ using SDL2
framework.
the gl contexts get created by SDL_GL_CreateContext(window)
.
i can make jani calls to java if needed.