[osg-users] How to convert osg::Texture to osg::Image?
Robert Osfield
robert.osfield at gmail.com
Wed May 20 02:36:44 PDT 2015
Hi Michael,
On 20 May 2015 at 04:05, michael kapelko <kornerr at gmail.com> wrote:
> I want to make sure I got you right.
> There's no way to convert Texture to Image, I can only get the Image at the
> time of Camera draw operation.
Partially correct. There is an
osg::Image:::readImageFromCurrentTexture(..) that allows one to
convert the current bound texture to an osg::Image.
> Thus, it would be easier to attach the Image
> to Camera. Correct?
I didn't suggest attaching an osg::Image to osg::Camera at any point.
What I would suggest is using a osg::Camera FinalDrawCallback to do
Image::readPixels(). Have a look at the osgscreencapture example.
Robert.
More information about the osg-users
mailing list