Hi all,

I have an osg::Camera that renders to an FBO texture, and at some
given point in time, I want to take a snapshot (for later rendering)
of a sub-region of that render target's texture. I've tried two
methods, one that works but is not optimal, and another that doesn't:

The first is to attach an osg::Image to the camera for a single frame.
This works, but seems needlessly costly since I don't need to read
data back into main memory, I just need a texture snapshot in graphics
memory to render onscreen later.

My second approach was to create a new osg::Texture object and use
osg::Texture::copyTexImage2D in a camera post-draw callback, but I
only succeeded in copying a region of the framebuffer (as the
documentation indicates -- I thought it was worth a shot anyway).

Anyone out there know of a better way to accomplish what I'm trying to do here?

Thanks,
Craig
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to