for those interested, i came up with the following and it seems to
work.
for those that know way more about this than me, it'd be great to know
if there's a better way or if i'm doing anything truly awful :)
tia//
------------------------------------------------------------
class WallpaperServiceHelper extends WallpaperService{
@Override
public final Engine onCreateEngine(){
return new WallpaperEngineHelper(getApplicationContext());
}
protected class WallpaperEngineHelper extends Engine{
private Context mContext;
private RenderScriptGL mRs;
private MyRenderRs mRender;
public WallpaperEngineHelper(Context c){
super();
mContext = c;
}
@Override
public void onSurfaceChanged(SurfaceHolder holder, int format,
int w, int h) {
super.onSurfaceChanged(holder, format, w, h);
if(mRs == null){
RenderScriptGL.SurfaceConfig sc = new
RenderScriptGL.SurfaceConfig();
mRs = new RenderScriptGL(mContext, sc);
mRs.setSurface(holder, w, h);
mRender = new MyRenderRs();
mRender.init(mRs, w, h);
}
}
@Override
public void onSurfaceDestroyed(SurfaceHolder holder) {
super.onSurfaceDestroyed(holder);
if(mRs != null){
mRs.destroy();
}
}
}
}
------------------------------------------------------------
On Aug 22, 2:40 am, newbyca <[email protected]> wrote:
> are there any tutorials or source code examples on incorporating
> RenderScript into a live wallpaper?
>
> i've looked quite a bit and can't find anything ... or maybe i missed
> something obvious?
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en