如何创建 OpenGL 动态壁纸?

发布于 2024-10-06 09:46:22 字数 442 浏览 0 评论 0原文

我正在尝试找到创建 Android OpenGL 动态壁纸的正确方法,即一种将使用 GLSurfaceView 编写的应用程序转换为动态壁纸的方法。令人惊讶的是,Android 官方文档中似乎没有任何关于此的内容,而且也不清楚该怎么做。

我在其他地方发现了一些关于此问题的讨论,其中大多数最终链接到 Android 开发人员编写的以下代码: http://www.rbgrn.net/content/354-glsurfaceview -adapted-3d-live-wallpapers

但是,页面上的评论表明代码存在问题(内存泄漏、锁定)。有谁知道有什么替代方案吗?如果我将壁纸上传到市场,我显然希望避免因错误代码引起的投诉。

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

佼人 2024-10-13 09:46:22

我找到了一个可能对您有帮助的开源示例。
http://code.google.com/p/android-deep-wallpaper/

另外,看起来像是使用 open GL,GL ES 代码需要从不同的线程调用。

希望这有帮助:D

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

ㄟ。诗瑗 2024-10-13 09:46:22

有一个用于为 Android 构建 OpenGL 动态壁纸的库,称为 GLWallpaperService。您可以在 GitHub 上的 GLWallpaperService 找到。它包含您在 rbgrn.net 上链接到的代码,但包含一些错误修复。还有一些可用的替代实现。祝你好运。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文