Hi Wang, Have a look at the ScreenCaptureHandler.cpp in src/osgViewer as this has code for capturing the screen and writes it to disk. It's does a bit more than this as well so just search through the code for the relevant writeImageFile(..) usage.
Robert. On 21 February 2013 11:02, Wang Gang <[email protected]> wrote: > Hi, > > Description: > Use FBO way, render data to the texture, how to put the texture of the data > related to the Image, and then save to disk, > > In the OpenGL in corresponding: > GlReadBuffer (GL_COLOR_ATTACHMENT0_EXT); > GlReadPixels (0, 0, texSize, texSize, texture_format, GL_FLOAT, data); > > In the OSG > the function > virtual void operator () (OSG: : RenderInfo & RenderInfo) const () > How to write, how to put Texture2D data saved to the Image, and then save to > disk, > > > Could you give some advice > > > Thank you! > > Cheers, > Wang > > ------------------ > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=52806#52806 > > > > > > _______________________________________________ > osg-users mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

