Author Topic: Live wallpaper  (Read 1218 times)

Offline fintroll

  • byte
  • *
  • Posts: 6
    • View Profile
Live wallpaper
« on: August 16, 2011, 04:09:15 pm »
Hi, everybody))

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

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11749
    • View Profile
    • http://www.jpct.net
Re: Live wallpaper
« Reply #1 on: August 16, 2011, 07:11:02 pm »
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.

Offline fintroll

  • byte
  • *
  • Posts: 6
    • View Profile
Re: Live wallpaper
« Reply #2 on: August 18, 2011, 08:23:48 pm »
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.

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11749
    • View Profile
    • http://www.jpct.net
Re: Live wallpaper
« Reply #3 on: August 18, 2011, 10:04:26 pm »
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.