The proper way currently would be the way the GlWallpaperService does
it, get a egl context and handle everything yourself.

It really doesn't have that much of a performance hit, I use the same
code in a action that I do in a lwp using that class as a wrapper and
I get about 75% the performance of the activity that doesn't use it at
all. Considering that the LWP is running in the background I kind of
expect at least a 20% hit just because, so there is maybe 5%
performance hit from using that code.

Adam

On Oct 13, 7:05 am, "mr.winky" <mr0wi...@gmail.com> wrote:
> Thats fine, but you didnt answer the original question which was.....
> What is the right way to do this? You say its supported on your
> website but offer no clue as to how to do it the "correct" way. Is
> what Robert Green posted the right way to go about it or is there
> another method. If there is, could you please point me in that
> direction Diane, and if its something google has overlooked, then just
> tell me.
>
> On Oct 13, 3:16 am, Robert Green <rbgrn....@gmail.com> wrote:
>
>
>
> > It was originally a submission for android master is why it is in that
> > namespace :)
>
> > Yes, if you use it (and be aware that it does NOT reset the gl context
> > on orientation changes so do not reload vram content like normal or at
> > least make sure to delete first) you will definitely want to put it in
> > your own package/namespace.
>
> > FYI - it doesn't delete the context because for some unknown reason
> > many phones like to hard freeze right in eglMakeDisplayCurrent with
> > the SharedBuffer timed out problem.  Leaving the context in tact
> > worked around it for some phones but there are other issues on other
> > phones as well.
>
> > On Oct 13, 1:43 am, Dianne Hackborn <hack...@android.com> wrote:
>
> > > Note that code is very broken -- it is putting a class in the android
> > > namespace, which it is not allowed to do.  PLEASE change this to a valid
> > > namespace before using it.  You are likely to break shortly if you don't.
> > >  Thanks.
>
> > > On Tue, Oct 12, 2010 at 10:56 PM, mr.winky <mr0wi...@gmail.com> wrote:
> > > > I've been using the GLWallpaperService as posted by Robert Green
> > > > (http://www.rbgrn.net/content/354-glsurfaceview-adapted-3d-live-
> > > > wallpapers), which has worked so far for the live wallpapers but I'm
> > > > hitting a wall when it comes to performance. The GL code is executing
> > > > at the expected speed when swapping (about 14ms after the swap
> > > > occurs), but there seems to be an extreme overhead with the wallpaper
> > > > code of 33ms.
>
> > > > For example, if I was to implement a basic live wallpaper that only
> > > > called gl.glClearColor and nothing else, the maximum framerate I can
> > > > achieve is 30fps (33ms), which is far lower than it should be. Now the
> > > > phone refresh rate is 16ms, from what I have read, so I could
> > > > understand hitting a wall at 60 fps.
>
> > > > The question is if there is an alternative way out there? I tried
> > > > naively using the GLSurfaceView with no luck and am looking for
> > > > suggestions from those who may have encountered this issue or know of
> > > > a solution. I have been googling but all posts send me back to the
> > > > above site from Robert Green as the "only" way to do this, and I have
> > > > had no luck finding a live wallpaper "sample" from the SDK that uses
> > > > OpenGL while they state that you have access to OpenGL from here:
>
> > > >http://developer.android.com/resources/articles/live-wallpapers.html
>
> > > > I tried searching for the code for the bundled live wallpapers with no
> > > > luck, if anyone could throw me a link to one of the wallpapers that
> > > > uses OpenGL that would more than enough for me to figure it out (if a
> > > > different method is used ;)).
>
> > > > --
> > > > You received this message because you are subscribed to the Google
> > > > Groups "Android Developers" group.
> > > > To post to this group, send email to android-developers@googlegroups.com
> > > > To unsubscribe from this group, send email to
> > > > android-developers+unsubscr...@googlegroups.com<android-developers%2Bunsubs
> > > >  cr...@googlegroups.com>
> > > > For more options, visit this group at
> > > >http://groups.google.com/group/android-developers?hl=en
>
> > > --
> > > Dianne Hackborn
> > > Android framework engineer
> > > hack...@android.com
>
> > > Note: please don't send private questions to me, as I don't have time to
> > > provide private support, and so won't reply to such e-mails.  All such
> > > questions should be posted on public forums, where I and others can see 
> > > and
> > > answer them.- Hide quoted text -
>
> > - Show quoted text -

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to