Android live wallpaper in Opengl ES 2.0 and preference management

285 Views Asked by At

I'm writing a Opengl ES 2.0 live wallpaper for Android starting from article found here. In the code of the article to apply preference changes, you need to restart wallpaper (as wrote in section 4. Viewing the new live wallpaper).

I want to bypass this limitation: i want to switch from preference activity to wallpaper and recreate scene acknowledging changes in preferences.

enter image description here

I try to put code for scene generation (texture bindind, shader rebuild, etc) in onSurfaceChanged(GL10 glUnused, int width, int height) of the renderer, but this solution causes many crash (due to synchronization, i suppose).

Has anybody got the same problem?

0

There are 0 best solutions below