0

Im working on a 3D live wallpaper for android using rajawali. When I turn the screen off and on, its loading the whole scene again what takes some seconds depending on device and scene complexity. Id like to keep my wallpaper in memory "forever" to have the wallpaper visible instantly after the screen turn on.

From what I have found this behavior is because openGL loose context when calling OnPause and OnResume events. I tried setPreserveEglContextOnPause which "may" preserve context, but actually it changes nothing.

Can anybody help me to solve this problem?

genpfault
  • 51,148
  • 11
  • 85
  • 139
  • Check if scene caching is enabled by `RajawaliRenderer::getSceneCachingEnabled()`. It is not the context that is slowing you down as Rajawali caches scene usually. – kiranpradeep May 15 '15 at 06:06
  • Thanks for reply. Yes scenecaching is enabled by default in rajawali. Maybe its important to say that when I run app, then exit it, the wallpaper is visible instantly - so the LWP scene remains loaded even after playing games etc. But after comming from sleep it has to reload, what is pretty stupid and most likely related to EGLcontext behavior. – NinjaSkillZ May 15 '15 at 08:38

0 Answers0