Hi Sam, Can you post processing on the pixels be done entirely on the GPU? If so then the best way would be to render the entire scene to a FBO and then re-render this FBO's texture with your post-processing shader. This will result in much better performance than if you have to fallback to using a glReadPixels and doing processing on the CPU as the later will require a round trip to the GPU and stall the graphics pipeline in the process.
Robert. On 30 November 2011 23:47, Sam James <itsmike...@verizon.net> wrote: > Hi all, > > I'm fairly new to osg and graphics programming in general, so please bear > with me :) > > I am looking to retrieve the pixels from my scene after everything (except > the post processing/overlay stuff) has been rendered. I need to get this > every frame to perform some simple image analysis of the scene which then > will effect how the final frame is displayed. The main catch is I need this > to be fast so that I don't take any major performance hits. > > I plan to use a PostDrawCallback, but does the FBO allow me to avoid calling > glReadPixels or speed it up at all? If so how do I set it up to do so? Or are > there any other ways to avoid copying to main mem? > > Also, after the PostDrawCallback is it possible to still use a frag shader to > modify the scene after I perform my analysis, or do I have to modify the > pixels in my callback function? > > Any suggestions or advice is greatly appreciated. Thanks > > ------------------ > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=44151#44151 > > > > > > _______________________________________________ > osg-users mailing list > osg-users@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org