Hi,
you can also make another RTT camera that looks at a part of the first
camera's output and just renders to another texture at the time you
want. You can put cameras under a switch to turn them on and off. See
the osggameoflife example.
jp
Craig Bosma wrote:
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
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
--
This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard.
The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html.
This message has been scanned for viruses and dangerous content by MailScanner,
and is believed to be clean. MailScanner thanks Transtec Computers for their support.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org