Actually, after thinking about this for awhile, it may be best to call
updateTexImage in rendering method instead (Renderer.onDrawFrame). There
you know for sure underlying texture is created etc.

--
H
On Feb 21, 2012 11:49 AM, "Harri Smått" <[email protected]> wrote:

>
> On Feb 20, 2012, at 4:41 PM, AdroidDev wrote:
> > SurfaceTexture has method updateTexImage()? How correct use this
> > method?
>
> I have no experience in SurfaceTexture but I would expect workflow goes
> roughly as;
>
> 1. Implement SurfaceTexture.onFrameAvailable(..).
> 2. Once new frame is available trigger a runnable to be ran on render
> thread (GLSurfaceView.queueEvent(..)).
> 3. On render thread runnable call SurfaceTexture.updateTexImage().
>
> This way you should be able to update texture in a way it shouldn't harm
> rendering - meaning texture is not altered during rendering. But as said, I
> haven't tried this myself yet, will try something like this as soon as I
> get my hands on a device running on API 14+ though.
>
> --
> H

-- 
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

Reply via email to