[osg-users] fast texture readback from FBO?

Robert Osfield robert.osfield at gmail.com
Tue Jun 7 01:47:15 PDT 2016


Hi Christian,

On 7 June 2016 at 09:31, Christian Buchner <christian.buchner at gmail.com> wrote:
> would anyone have an example for a render to texture with FBO with a fast
> read-back into CPU memory? This should be an example that does not block
> OpenSceneGraph's frame loop.
>
> The current code I have uses the terribly slow glReadPixels data path.

The issue and solution is the same regardless of the use of FBO so non
FBO code paths will illustrate how to do it for you.  The
osgscreencapture example has code paths illustrating how to use
PixelBufferObject to single, double and triple buffer the copy.  To
avoid the stall of the graphics pipeline you'll need to use double
buffering.

Robert.



More information about the osg-users mailing list