Hi Sergey,
your proposal works very well.

Thank you very much,
Dietmar Funck


hybr wrote:
> Hi,  Dietmar Funck.
> 
> In order to get another texture attached you can use something like
> 
> 
> _cam->setCullCallback( new fboAttachmentCullCB( this ) );
> 
> void fboAttachmentCullCB::operator()(osg::Node* node, osg::NodeVisitor* nv)
> {
> osg::Camera* fboCam = dynamic_cast<osg::Camera*>( node );
> osgUtil::CullVisitor* cv = dynamic_cast<osgUtil::CullVisitor*>(nv);
> 
> if ( fboCam && cv)
> {
> cv->getCurrentRenderBin()->getStage()->setFrameBufferObject(NULL); // reset 
> frame buffer object - see RenderStage::runCameraSetUp for details, the fbo 
> has to be created again
> cv->getCurrentRenderBin()->getStage()->setCameraRequiresSetUp( true ); // we 
> have to ensure that the runCameraSetUp will be entered!
> }
> traverse(node,nv);
> }
> 
> Cheers,
> Sergey.
> 


------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=36841#36841





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

Reply via email to