Hi Art!

art wrote:
> 
> I think we have to investigate the main osg code, since it seems that dynamic 
> resizing of FBOs and its attached textures isn't well supported, but I am not 
> sure.
> 


I'm not sure if this addresses your problem exactly (I'm not very familiar with 
osgPPU):
If I need to adapt my viewport and to resize my RTT-textures I use something 
like this:


Code:

_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);
}





Best regards,
Mick[/code]

------------------------
SVT Group

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





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

Reply via email to