Live wallpaper

Started by fintroll, August 16, 2011, 04:09:15 PM

Previous topic - Next topic

fintroll

Hi, everybody))

sorry for the noob question, can you tell me in detail, how can i do live wallpaper using this excellent engine?

EgonOlsen

No idea about how to setup a live wallpaper, but the engine makes no assumptions about the context it's running in. As long as you provide it with a proper gl context, it will render it. It doesn't care about the source of this context.

fintroll

I have found the some OpenGL live wallpaper engine.
Please help me to combine your game engine to this LW engine on Hello World example.

EgonOlsen

The source links to the actual origin of the code, which contains a little more documentation:

Quote
So how do you use this? Extend GLWallpaperService and in your subclass, declare an inner class that extends GLEngine. Override onCreateEngine() to return your GLEngine subclass. In your GLEngine subclass, instantiate your Renderer, configure it and set it using setRenderer(Renderer) and setRenderMode(int). Your engine can handle touch events if you call setTouchEventsEnabled(true) and can also handle sensor data and preference changes. Everything else works exactly like it did with GLSurfaceView.

So my guess is, that all you have to do is to grab the renderer code from the HelloWorld example and put it into the implementation for the wallpaper's renderer. As mentioned, all that jPCT-AE needs is the gl context. As long as you provide this, the engine doesn't care about anything else.