Closed power7714 closed 11 years ago
We can only support Rajawali based questions. As this is about using Canvas for Live Wallpapers it is out of scope. Stackoverflow would be a good place to start for this though.
Also as a tip from my experience. Do not use Canvas on Live Wallpapers. Canvas is extremely CPU dependent and many devices will throttle your wallpaper and CPU to save battery life. What you will experience is a huge change in frame rate such as 30 when you are swiping around the screen then drop down to 10 when you let the phone idle for a few seconds. Even with simple animations canvas for live wallpapers has extremely poor performance.
The reason I asked this question is because the live wallpaper works. The text displays. What doesn't is the rendered model. It doesn't even call the renderer and I don't know why. So the question was geared toward the Rajawali framework.
This is actually a generic Java/Android question for Stackoverflow. But give this a try. Replace
public DemoWallpaperEngine(SharedPreferences sharedPreferences,
Context baseContext, TestRenderer mRenderer) {
// TODO Auto-generated constructor stub
}
With this:
public DemoWallpaperEngine(SharedPreferences sharedPreferences,
Context baseContext, TestRenderer mRenderer) {
super(sharedPreferences, baseContext, mRenderer);
}
Didn't work. I changed return new DemoWallpaperEngine To return new WallpaperEngine And the model was rendered but not the text. When I change back, the text shows but not the model
I tried removing the DemoWallpaperEngine class but kept the content. Only the model was shown. If anyone knows an easier way of doing this, a simple example would be helpful.
So are you trying to combine a regular canvas live wallpaper with an OpenGL live wallpaper? If so, I have no idea how to do that if it is even possible.
Closing as stale.
I have this in my Wallpaper service but when it loads, it doesn't render the model or call the renderer:
The Renderer just has the basic code from the examples. Loading a primitive cube. There are no errors in the logcat. If anyone could help me with this, I would greatly appreciate it. Thank you.