Well, the simplest way to retrieve the image from the RTT texture is to attach an image to the color buffer of the camera.
Of course this slows down the rendering loop if you read every image rendered. So it is possible to attach the image only before the frames you actually want. When changing the image attachments you should also set the camera's rendering cache to NULL (the cache is pointer to RenderStage), so on the next frame it will initialize the RenderStage with the new settings. The osgprerender shows how to attach image to color buffer. Guy. ________________________________ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Guerrero, Michael (CIV) Sent: Wednesday, April 02, 2008 2:38 AM To: OpenSceneGraph Users Subject: Re: [osg-users] Getting the Image from a Texture2D used as a render target After looking into this further, it seemed that using glGetTexImage would be able to copy from a texture used as a render target (FBO). I have tried this only to be left with a black texture that never gets filled in. I know that function works by grabbing whatever texture is currently bound and returning its data. Using osg, the way to do this seemed to be the following: osg::GraphicsContext *context = cam->getGraphicsContext(); osg::State *currentState = context->getState(); currentState->setActiveTextureUnit(0); currentState->applyTextureAttribute(0, mColorTexture); osg::ref_ptr<osg::Image> imageCapture = new osg::Image; imageCapture->readImageFromCurrentTexture(0, false); Unfortunately imageCapture is entirely filled with zeros. Anyone have some ideas or experience with this sort of thing? Thanks, Michael Guerrero ________________________________ From: Guerrero, Michael (CIV) Sent: Tuesday, April 01, 2008 2:23 PM To: OpenSceneGraph Users Subject: [osg-users] Getting the Image from a Texture2D used as a render target Hi, I'm trying to retrieve texture data that I have rendered from video memory back to main memory. I was initially hoping I could set up a render target as usual and then just call GetImage on the Texture2D but that doesn't work. Is there any easy way to do this? Thanks, Michael Guerrero
_______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

