thank you so much for ur precious advice. that is what we were looking for

--- On Thu, 3/18/10, Andres Colubri <[email protected]> wrote:

From: Andres Colubri <[email protected]>
Subject: Re: [android-developers] Re: screen flickering in GLSurfaceView
To: [email protected]
Date: Thursday, March 18, 2010, 6:46 AM


> What happens in your case is the following (as far as i can tell). In
> the first onDrawFrame() call you render some elements to the initially
> black back buffer. The front buffer is also black. Now you leave
> onDrawFrame() and the back buffer gets presented while the front
> buffer becomes your new back buffer. But the new back buffer does not
> contain the elements you just rendered! So you render your new
> elements to a completely black back buffer this time so the final
> image is not a composition of the first onDrawFrame and the second
> one. As the buffers are constantly swaped they never have the same
> content as half of the elements is in one buffer and the others are in
> the other buffer.
>   
Thanks for the explanation, this makes the source of the problem perfectly 
clear.

> There might be a way to disable double buffering in the GLSurfaceView
> if you use that.   
That would be nice, I wonder if it is possible to do at all... After a quick 
look at the source code of GLSurfaceView, it seems to me that the double 
buffering is hard coded into the EglHelper class.

> Otherwise you will need to use EGL directly to setup
> your OpenGL surface without double buffering. 
I'd like to avoid this, since it basically means implementing my own 
GLSurfaceView...

> On the other hand i wonder why you don't compose your complete scene in a 
> single
> onDrawFrame call.
>   
Because the goal is to have an interactive drawing application controlled by 
the user input (brushes strokes, etc).

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



      

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