Android suspend lose GL context
Posted: Fri Nov 15, 2013 6:44 pm
Using Ogre 1.8 on Android.
When application loses focus gl context is destroyed and after resume I only see black screen.
This is described in Android documentation here http://developer.android.com/reference/ ... derer.html
When application loses focus gl context is destroyed and after resume I only see black screen.
This is described in Android documentation here http://developer.android.com/reference/ ... derer.html
How can handle this situation with Ogre?EGL Context Lost
There are situations where the EGL rendering context will be lost. This typically happens when device wakes up after going to sleep. When the EGL context is lost, all OpenGL resources (such as textures) that are associated with that context will be automatically deleted. In order to keep rendering correctly, a renderer must recreate any lost resources that it still needs. The onSurfaceCreated(GL10, EGLConfig) method is a convenient place to do this.