Re: [android-developers] Re: screen flickering in GLSurfaceView

2010-03-26 Thread Andres Colubri
Hi, I just wanted to mention that I found a method that solves the flickering problem in continuous drawing applications: * right after the frame has been completely drawn, but before doing the buffer swap, copy the screen image into a texture using glCopyTexImage2D. This texture should be

[android-developers] Re: screen flickering in GLSurfaceView

2010-03-18 Thread Mario Zechner
The problem is that there's actually to targets you render to, the back and the frontbuffer of the OpenGL surface. In each call to Renderer.onDrawFrame() you actually render to the back buffer while the front buffer is presented on screen. Once you leave the onDrawFrame method the back buffer

Re: [android-developers] Re: screen flickering in GLSurfaceView

2010-03-18 Thread Andres Colubri
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

[android-developers] Re: screen flickering in GLSurfaceView

2010-03-18 Thread Mario Zechner
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

Re: [android-developers] Re: screen flickering in GLSurfaceView

2010-03-18 Thread Andres Colubri
ok, I see... thanks for the link. So I guess that finding a way to disable the double buffering, at least temporarily, should be the best way to go then... Mario Zechner wrote: oh, i tried that once with OpenGL ES. I didn't use the backbuffer but drew directly to a texture using an

Re: [android-developers] Re: screen flickering in GLSurfaceView

2010-03-18 Thread amsale zelalem
thank you so much for ur precious advice. that is what we were looking for --- On Thu, 3/18/10, Andres Colubri andres.colu...@gmail.com wrote: From: Andres Colubri andres.colu...@gmail.com Subject: Re: [android-developers] Re: screen flickering in GLSurfaceView To: android-developers