I have a class which implements GLSurfaceView.Renderer and uses Open GL ES 2.0, and works perfectly as a standard application.
However I'd like to expand this so that its a live wallpaper. Naturyally I've got a service class which exteds WallPaperservice, and in turn a engine class which extends WallpaperService.Engine.
In the normal version of the code I can just do
mGLSView = new GLSurfaceView(this); // in the engine this becomes 'new GLSurfaceView(getBaseContext());'
mGLSView.setEGLContextClientVersion(2);
mGLSView.setRenderer(new myRenderer());
setContentView(mGLSView);
However in the 'Engine' you cannot call setContentView. Presumably I need to pass the surface into the GLSurfaceView somehow, but I really cant see how. Every example or tutorial that I've found uses OpenGL 1, and because I'm quite new to this I cant quite figure out how to adapt them for 2.0.
So does anyone know of a simple example of a live wallpaper using OpenGL ES 2.0? Or a good pointer on where to readup?
Thanks,