android: GLWallpaperService causing green screen

匿名 (未验证) 提交于 2019-12-03 07:50:05

问题:

I am trying to create a live wallpaper using opengl (<2.0).

I imported and tried to run Robert Green's GLWallpaperService and Example here (using Eclipse SDK).

My phone is a Huwei Ascend Android 2.1. I already know it can run other opengl LWPs.

When I run the package, it just produces a solid green screen, and no shapes or anything.

Ive researched it alot and still cant figure out why this is happening.

I read a few times that the namespaces have to be changed to my package. But still no luck...

I tried linking his GLWallpaperService JAR library to my package as per instructed. Nope.

Any guidance would be much appreciated.

回答1:

try gl.glScale() in your Renderer Code. I also got the same problem and i figured out that my GLView was so much zoomed that i cant see anything. try to reduce scale. My program wo



回答2:

I fixed this on my Galaxy Nexus by adding

gl.glEnableClientState(GL10.GL_VERTEX_ARRAY);

to onSurfaceCreated in MyRenderer.java.



回答3:

The example project you linked to had bugs in the rendering code, as others here have pointed out. It has since been deprecated and deleted for maintenance\workload reasons.

However, there's currently some example wallpaper code embedded into the main repository of GLWallpaperService. It's set up as a full Android application so developers can test using that example as needed.



标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!