Hi,

Thanks for the help.  I think that I stumbled on the answer as you were typing 
it.  While stepping through the FrameBufferObject code, I was looking for where 
a Renderbuffer object might attach.  I saw that it needed an attached Image, so 
on a whim I allocated one and attached it to my camera.  Voila!  I was going to 
reply to my own post with my findings, but you beat me to it.  I really 
appreciate everyone's help.

Thanks,
Brian


 On Fri Jul 27 11:40 , 'Robert Osfield' <[EMAIL PROTECTED]> sent:

>Hi Brian,
>
>On 7/27/07, Brian [EMAIL PROTECTED]> wrote:
>> Well, yes and no.  That would be great, but when the FrameBufferObject is 
>> set up, it uses a texture in the call to attach.
>>
>>     renderImplementation = osg::CameraNode::FRAME_BUFFER_OBJECT;
>>     m_CameraNode->setRenderTargetImplementation(renderImplementation);
>>     m_CameraNode->attach(osg::CameraNode::COLOR_BUFFER, m_Texture.get());
>>
>> Every example I have seen that uses FBOs uses a texture with a NULL image, 
>> unless of course, the FBO initialization fails and then it reverts to using 
>> pbuffers.  When I try using m_Texture->getImage(), this returns NULL, so I 
>> have no pointer to use with the readImageFromCurrentTexture function.
>
>If you attach in Image to a RTT osg::Camera then it should
>automatically copy the image at the end of render that subgraph, this
>should remove the need to do it manually.
>
>The osgprerender example has a code path that does this.
>
>Robert.
>_______________________________________________
>osg-users mailing list
>[email protected]
>http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

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

Reply via email to