Hi Javier

>>Is there any way to explicitly pass an osg::FrameBufferObject to a Camera,
>>so the camera renders into it?

Yes you can use a framebufferobject as a render to texture target, checkout
the osgprerender example. If you want to use the result of your render in
your main app i.e. read the pixel info for some sort of gpu compute, then
you need to use a pbuffer for your main viewer. You set it up something like
the following

Set pbuffer in the graphics traits (used to create your context) to true
Set the viewers renderTargetImplementation to FRAME_BUFFER_OBJECT
Attach an image as the cameras color buffer.

Now when you render the result will end up in the image and could be saved
to disk if you like.

Hope that helps
Tom

PS
Checkout my helper viewer class and check for the _renderOffScreen bits
http://code.google.com/p/hogbox/source/browse/trunk/src/hogbox/HogBoxViewer.cpp
Around line 305 and 357


>
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to