[osg-users] How to convert osg::Texture to osg::Image?

michael kapelko kornerr at gmail.com
Tue May 19 06:24:12 PDT 2015

I have osg::Texture that is attached to camera, it contains a rendered
scene (deferred rendering). I want to save it to a PNG file.
I tried to use osg::Texture::getImage(), but the resulting osg::Image seems
to be invalid, because osgDB::writeImageFile() crashes with it.
What's the correct way to convert Texture to Image?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20150519/531a006d/attachment-0002.htm>

More information about the osg-users mailing list