is this because that the event list of the render gets full? because i
have noticed that the surface view generate touch move events very
rapidly, and multiple touch up events. but only one touch down event
when i press.

if the event queue of the render object has a fixed size, it may gets
flooded and that is why i cannot see the touch down event.

how do i solve this?

On Apr 2, 1:14 pm, billconan <[email protected]> wrote:
> hi,
>
> because glsurfaceview uses 2 threads to handle UI and rendering, to
> reduce flickring, i need to pass a motionevent from the ui thread to
> the render thread.
>
> this is documented here at the official reference:
>
> http://developer.android.com/reference/android/opengl/GLSurfaceView.h...
>
> my current code looks like this:
>
>         public boolean onTouchEvent(final MotionEvent event) {
>
>                 Log.d("surfaceview Action:",event.getAction()+";");
>
>                 queueEvent(new Runnable() {
>                         public void run() {
>                                 renderer.debugevent(event.getAction());
>
>                         }
>                 });
>                 return true;
>         }
>
> but the problem is, if the event.getAction()==0, which means a touch
> down event, the function renderer.debugevent(event.getAction()); will
> not be executed.
>
> there must be something wrong with queueEvent.
>
> is this a known bug or something? is there any solution? thanks!

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

To unsubscribe, reply using "remove me" as the subject.

Reply via email to