开发者

How to create an OpenGL live wallpaper?

开发者 https://www.devze.com 2023-01-28 18:15 出处:网络
I\'m trying to find the right approach for creating an Android OpenGL live wallpaper i.e. a way to convert an app written to use GLSurfaceView into a live wallpaper. There appears to be nothing in the

I'm trying to find the right approach for creating an Android OpenGL live wallpaper i.e. a way to convert an app written to use GLSurfaceView into a live wallpaper. There appears to be nothing in the official Android documentation about this surprisingly and it's not obvious what to do.

I've found a few discussions about this elsewhere where most end up linking to the following code written an Android developer: http://www.rbgrn.net/content/354-glsurfaceview-adapted-3d-live-wallpapers

However, the comments on the page suggest there are problems with the code (memory leaks, lock ups). Does anyone know of any alternatives? If I upload a wallpaper to the market, I'd obviously like to avoid complaints caused 开发者_运维技巧by buggy code.


I found an open source example that may help you. http://code.google.com/p/android-deep-wallpaper/

also, it looks like to use open GL, the GL ES code needs to be called from a different thread.

hope this helps :D


There is a library for building OpenGL Live Wallpapers for Android called GLWallpaperService. You can find GLWallpaperService on GitHub. It includes the code you linked to on rbgrn.net but with a few bug fixes included. There are some alternate implementations available as well. Good luck.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号