oh, i tried that once with OpenGL ES. I didn't use the backbuffer but drew directly to a texture using an intermediate Bitmap as the drawing surface and reuploading only those parts of the texture that changed. You can find a video and an apk of that at http://apistudios.com/hosted/marzec/badlogic/wordpress/?cat=10. The problem is that if you update to much of the texture at once you get 100ms interruptions which might be visible to the user.
On 18 Mrz., 14:46, Andres Colubri <[email protected]> wrote: > > 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

