PDA

View Full Version : glBlitFramebufferEXT vs glReadPixels



aronsatie
04-20-2008, 04:19 AM
Hi,

My final output is video which is interlaced so I need to render at twice the final rate (which is 25 fps in my case). Then I either read back all frames, interlace them on the CPU side or do the interlace in the GPU by blitting every other line from one frame (rendered to FBO1) to the other (rendered to FBO2). The second method has the advantage of having to read back only half the amount of data compared to the first method.

Is there any overhead in glBlitFramebufferEXT that by using it hundreds of times to move just a single line that would make me lose the advantage of saving a ReadPixels?

Zengar
04-20-2008, 05:45 AM
I suggest you render the frames to the textures and do the interlacing in a fragment shader. This should be much faster then your solution.

yooyo
04-20-2008, 03:24 PM
Or use stencil buffer to mask even and odd lines. Then render frame twice, just change stencil function.