GLwallpaper not working on emulator?

173 views
Skip to first unread message

U A

unread,
Nov 17, 2011, 4:31:29 PM11/17/11
to GLWallpaperService
Hi all. I just cloned the latest github repo, downloaded the latest
wallpaper jar, imported the example GLWallpaper into Eclipse, and
installed it into the Android 2.2 & 2.3 emulators.

I get a green screen.

However, the same apk works on my phone. Any ideas?

Mark F Guerra

unread,
Nov 17, 2011, 4:42:19 PM11/17/11
to GLWallpaperService
Other folks have reported the same issue. There's something wrong with
it, I'm not sure what. However if you're seeing a green screen, then
OpenGL is drawing those frames.

I would like to replace that test wallpaper entirely, to call it an
afterthought would be an understatement. Code donations are welcome,
though as of right now no one has sent in a renderer. I have half a
mind to search the internet for a nice open source wallpaper to use I
don't get something soonish.

See issue 16.
https://github.com/markfguerra/GLWallpaperService/issues/16

U A

unread,
Nov 17, 2011, 4:56:31 PM11/17/11
to GLWallpaperService
Are you sure it's not something with the library?

The demo seems straightforward enough---it uses glDrawElements,
triangle strips, color, lighting if I recall correctly.

My own wallpaper gives me the green screen too. I uses the same things
as the demo app + textures.

Has anyone been able to successfully get a GLwallpaper to work on an
emulator?


On Nov 18, 5:42 am, Mark F Guerra <markfgue...@gmail.com> wrote:
> Other folks have reported the same issue. There's something wrong with
> it, I'm not sure what. However if you're seeing a green screen, then
> OpenGL is drawing those frames.
>
> I would like to replace that test wallpaper entirely, to call it an
> afterthought would be an understatement. Code donations are welcome,
> though as of right now no one has sent in a renderer. I have half a
> mind to search the internet for a nice open source wallpaper to use I
> don't get something soonish.
>
> See issue 16.https://github.com/markfguerra/GLWallpaperService/issues/16

JesusFreke

unread,
Nov 17, 2011, 5:00:51 PM11/17/11
to glwallpap...@googlegroups.com
Yes, I've been able to run my opengl wallpaper in the emulator with no green screen issue. I think I got it to run using both Mark's existing GLWallpaper implementation, and the new one I submitted.

It's an open source wallpaper if you want to take a look - https://github.com/JesusFreke/Penroser

Josh Gooderham

unread,
Nov 17, 2011, 5:06:52 PM11/17/11
to glwallpap...@googlegroups.com
This has apparently been an issue for some time:
https://github.com/markfguerra/GLWallpaperExample/issues/1

I don't use the emulator because it's incredibly slow in my experience. And unreliable as this issue seems to confirm. Why not just test on the device? It's not that much slower a workflow.

Josh
https://market.android.com/developer?pub=gentlemandroid
http://www.gentlemandroid.com/

urisrs...@gmail.com

unread,
Nov 17, 2011, 5:09:40 PM11/17/11
to glwallpap...@googlegroups.com
because my desktop uses puppy Linux and its too old recognize my phone. so I've been forced to work on my net book.
--
Sent from my Android phone with K-9 Mail. Please excuse my brevity.

Josh Gooderham

unread,
Nov 17, 2011, 6:28:47 PM11/17/11
to glwallpap...@googlegroups.com
There's a dropbox client for linux isn't there? Until you figure out what the problem is you can drop your apk into a dropbox folder and grab it off your phone with the android dropbox client. It's not the world's fastest workflow but it beats emailing yourself the apk. It was what I used to do before I got a proper device.

urisrs...@gmail.com

unread,
Nov 17, 2011, 7:46:51 PM11/17/11
to glwallpap...@googlegroups.com
i find that eclipse has the quickest install. a few seconds instead of thirty or more. I'd rather figure out what's wrong with the wallpaper

urisrs...@gmail.com

unread,
Nov 19, 2011, 11:51:42 AM11/19/11
to glwallpap...@googlegroups.com
my wall paper is based on the demo. i created a new project and copied over the Java files. after recompiling, it now works on the emulator! yes, there is something wrong with the configuration files of the demo.

Fabrice SCHLEIFER

unread,
Dec 15, 2011, 3:41:22 AM12/15/11
to GLWallpaperService
Hi Gents,

I also ended up with the green background only problem.
I also tried a different renderer that clearly works into a regular
app. Nothing shows with the wallpaper.
The DrawFrame method is called continously but with no effect.
I created a new project abd copied over the Java Files : same result :-
(
Any special setting when you creating the new project ?
Any help welcome.

Regards, Fabrice


On 19 nov, 17:51, "urisrssfe...@gmail.com" <urisrssfe...@gmail.com>
wrote:


> my wall paper is based on the demo. i created a new project and copied over the Java files. after recompiling, it now works on the emulator! yes, there is something wrong with the configuration files of the demo.
> --
> Sent from my Android phone with K-9 Mail. Please excuse my brevity.
>

> Josh Gooderham <joshgooder...@gmail.com> wrote:
>
> There's a dropbox client for linux isn't there? Until you figure out what the problem is you can drop your apk into a dropbox folder and grab it off your phone with the android dropbox client. It's not the world's fastest workflow but it beats emailing yourself the apk. It was what I used to do before I got a proper device.
>

> Joshhttps://market.android.com/developer?pub=gentlemandroidhttp://www.gentlemandroid.com/


>
> On Thu, Nov 17, 2011 at 5:09 PM, urisrssfe...@gmail.com <urisrssfe...@gmail.com> wrote:
>
> because my desktop uses puppy Linux and its too old recognize my phone. so I've been forced to work on my net book.
> --
> Sent from my Android phone with K-9 Mail. Please excuse my brevity.
>

> Josh Gooderham <joshgooder...@gmail.com> wrote:
>
> This has apparently been an issue for some time:https://github.com/markfguerra/GLWallpaperExample/issues/1
>
> I don't use the emulator because it's incredibly slow in my experience. And unreliable as this issue seems to confirm. Why not just test on the device? It's not that much slower a workflow.
>

> Joshhttps://market.android.com/developer?pub=gentlemandroidhttp://www.gentlemandroid.com/


>
> On Thu, Nov 17, 2011 at 5:00 PM, JesusFreke <jesusfr...@jesusfreke.com> wrote:
>
> Yes, I've been able to run my opengl wallpaper in the emulator with no green screen issue. I think I got it to run using both Mark's existing GLWallpaper implementation, and the new one I submitted.
>

> It's an open source wallpaper if you want to take a look -https://github.com/JesusFreke/Penroser

urisrs...@gmail.com

unread,
Dec 15, 2011, 8:21:50 AM12/15/11
to glwallpap...@googlegroups.com
try setting view port. by default, its supposed to equal the current window (so no need to set it) but apparently you need it in the emulator.

after copying over the files to a new project and setting the viewport i was able to get the demo to work in the emulator. (and no, just changing the viewport doesn't work. i recall first messing around with the code to no effect then finally getting a working emulator demo after starting a new project)

by the way, with my app i still have some trouble. my background doesn't render just the main object. I've noticed that problem too on some phones like the galaxy family. it may or may not be a bug in my code. i haven't had time to debug properly.

--
Sent from my Android phone with K-9 Mail. Please excuse my brevity.

Marcin Budny

unread,
Sep 10, 2012, 4:35:21 PM9/10/12
to glwallpap...@googlegroups.com
Thanks. Using glSetViewport in onSurfaceChanged solved the problem for me. Experienced it on android 2.3.3 - both emulator and actual device. However ICS and JB worked fine without this.

renjith kn

unread,
Sep 29, 2012, 5:58:19 AM9/29/12
to glwallpap...@googlegroups.com
Hi Marcin, I am trying to fix the green screen issue I new to android , I like to know how to Set View port  , I have put this line of code gl.glViewport(0, 0, width, height); in onSurfaceChanged  in myRendrer.java. Is this is correct?
But Still it shows the green screen ,Not The triangle get drwan What to do ? Please any help .........

Marcin Budny

unread,
Sep 30, 2012, 4:05:19 AM9/30/12
to glwallpap...@googlegroups.com
Hi,

This is the only thing I did to fix the problem. Just make sure, that gl.glViewport(0,0,width,height) is the first line in onSurfaceChanged. In my case, I had identical behavior on actual Android 2.3.4 device. This fix worked both on the device and the emulator.

renjith kn

unread,
Oct 8, 2012, 12:55:17 AM10/8/12
to glwallpap...@googlegroups.com
Thank you Marcin, for your quick support ,At last I found the solution here  it is....

What I need to do is just add

gl.glEnableClientState(GL10.GL_VERTEX_ARRAY);

to onSurfaceCreated method along with the code line

gl.glViewport(0, 0, width, height);

in the onSurfaceChanged method in MyRenderer Class

Mark Guerra

unread,
Oct 16, 2012, 6:41:24 PM10/16/12
to glwallpap...@googlegroups.com
Thanks, guys! This is great.

At the moment, I'm having some issues with my development setup, which makes it hard for me to test this code. However, if someone could put this into a git commit and make it available so someone can confirm, that would help move this along.
Reply all
Reply to author
Forward
0 new messages