Hi Alexej & Sergey,

also note that if you only want to change a texture attachment and the formats and sizes stay the same, you can in the cull callback change it. Like so:

void KeepHistoryPass::CameraCullCallback::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 && !hp_->FirstPass_)
    {
osg::FrameBufferObject* fbo = cv->getCurrentRenderBin()->getStage()->getFrameBufferObject();
        if (fbo) {

fbo->setAttachment(osg::Camera::BufferComponent(osg::Camera::COLOR_BUFFER),

osg::FrameBufferAttachment(hp_->OutTextures_[hp_->OverwriteIndex_].get()));
        }
    }
    traverse(node, nv);
}

cheers
jp

On 11/10/2011 17:32, Alexej Fink wrote:
Hi hybr,

yes, it works now!

I was already on finding out, how can I change 
RenderStage::_cameraRequiresSetUp per frame. You've shorten this a lot!


Many thanks for your help!!!

Cheers,
Alexej

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





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


--
This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard. The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html.

This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.

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

Reply via email to