" In HC screenshots are implemented by re-rendering the screen
 to a texture."

And how do you do that? There is another way to access the texture
data beyond using glTexImage2D ?

On Sep 13, 5:12 pm, Dianne Hackborn <hack...@android.com> wrote:
> As a general rule, the faster the GPU is, the slower and less useful
> glReadPixels is.  This is certainly not a good way to do high frame rate
> video capture.  In HC screenshots are implemented by re-rendering the screen
> to a texture.
>
>
>
>
>
>
>
>
>
> On Tue, Sep 13, 2011 at 7:52 AM, drjunior <drjunior....@gmail.com> wrote:
> > What I am trying to do is to capture the framebuffers more than 25
> > times per second.
> > Using the Nexus S(with PowerVR SGX 540 GPU) I could capture the
> > framebuffers using glReadPixels almost 20 times per second.
> > However, with Samsung galaxy S2(MALI 400 GPU) I can only capture the
> > framebuffers 8 times per second....
>
> > I thought that this could be related with an internal casting that the
> > GPU has to do, but now I think that this GPU (MALI 400) doesn't have
> > some extension, like PowerVR SGX 540 GPU has, that improves the
> > performance of the glreadPixels operation...
>
> > There is another way to capture the framebuffer without using the
> > glReadPixels that is to draw the scenario in a texture and then use
> > the glTexImage2D function to copy the data. However, this glTexImage2D
> > function is not available on OpenGL ES.
>
> > On Sep 12, 3:42 pm, dattrax <jimhauxw...@googlemail.com> wrote:
> > > ReadPixels is always slow.  Not only does it have to flush the GL
> > > pipeline, storing information which is not kept on a eglswapbuffers
> > > (depth and stencil), but it has to convert from the internal
> > > rasterization formats to a RSO format.
>
> > > If readpixels wasn't required for the CTS, then it would have been
> > > removed a long time ago.
>
> > > What are you trying to do?  I suspect there is a more GPU friendly way
> > > to achieve the same thing.
>
> > > Jim
>
> > > On Sep 6, 10:59 am, drjunior <drjunior....@gmail.com> wrote:
>
> > > > I am using a samsung galaxy s2 and I am doing a glReadPixels operation
> > > > with this parameters:
>
> > > > glReadPixels(0, 0, sw, sh, GL_RGBA, GL_UNSIGNED_BYTE, ptr);
>
> > > > But this is taking more than one second to be performed. So, I think
> > > > that it's doing some kind of cast from "something" to
> > > > GL_UNSIGNED_BYTE. As I don't know how the OpenGL system is initialized
> > > > (the framebuffer layout), I also don't know the values that I have to
> > > > use in the function in order to avoid the casting.
>
> > > > Thanks,
>
> > --
> > unsubscribe: android-porting+unsubscr...@googlegroups.com
> > website:http://groups.google.com/group/android-porting
>
> --
> Dianne Hackborn
> Android framework engineer
> hack...@android.com
>
> Note: please don't send private questions to me, as I don't have time to
> provide private support, and so won't reply to such e-mails.  All such
> questions should be posted on public forums, where I and others can see and
> answer them.

-- 
unsubscribe: android-porting+unsubscr...@googlegroups.com
website: http://groups.google.com/group/android-porting

Reply via email to