surfaceholder - Getting an android app to keep it's OpenGL Context after hitting the home button -


first bit of context: i'm developing video game both android , iphone platforms. way iphone works, when user hits home button , returns game later, in circumstances game pick right left off no hicups. jump rendering , game loop. setting on ios platform absolutely easy me do. accomplishing on android has left me in fit of rage after hours of wrestling google results :p

i have own opengl setup both iphone , android, , has been working great. root of problem, believe, need surfaceholder create opengl context. here's sucky part, when screen loses focus of game (ie home button hit), android calls surfacedestroyed in surfaceview class , kills opengl context. could recreate new 1 new surfaceholder when surfacecreated called, need reload of art assets defeats purpose of i'm trying accomplish.

can somehow prevent android os killing surface holder, there sort of custom view can use work? there setting in manifest can me out here (i doubt have thoroughly tested of flags)? know possible because angry birds on android os.


Comments

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -