Hi Paul,

Thanks. I am almost done with modifications for DisplaySettings. I have to test 
it and will submit the code tomorrow. But I have one question regarding your 
changes in RenderStage.cpp. I have understood that RenderMask defines implicit 
attachments for main FBO and ResolveMask defines implicit attachments for 
multisample FBO. I noticed that when multisampling is not used both masks are 
actually set to RenderMask value (RenderStage.cpp line 352). But when 
multisampling is on, it looks like masks are swapped because ResolveMask is 
used to force implicit buffers for main FBO and RenderMask is used to force  
implicit buffers for MS FBO. Its bit surprising to me, but maybe its correct ?

For example: see excerpt from RenderStage lines 440-455 

if (!depthAttached)

{

    if( resolveBuffersMask & osg::Camera::USE_DEPTH_BUFFER )

    {

        fbo->setAttachment(osg::Camera::DEPTH_BUFFER, 

            osg::FrameBufferAttachment(new osg::RenderBuffer(width, height, 
GL_DEPTH_COMPONENT24)));

        depthAttached = true;

    }

    if (fbo_multisample.valid() &&

        ( renderBuffersMask & osg::Camera::USE_DEPTH_BUFFER ) )

    {

        fbo_multisample->setAttachment(osg::Camera::DEPTH_BUFFER, 

            osg::FrameBufferAttachment(new osg::RenderBuffer(width, height, 
GL_DEPTH_COMPONENT24, samples, colorSamples)));

        depthAttached = true;

    }

}

Cheers,
Wojtek Lewandowski

----- Original Message ----- 
From: "Paul Martz" <[email protected]>
To: "OpenSceneGraph Users" <[email protected]>
Sent: Monday, October 26, 2009 2:56 PM
Subject: Re: [osg-users] Improving multisampled FBO


> Wojciech Lewandowski wrote:
>> I will prepare and submit a code with these modifications if you accept 
>> general direction.
> 
> Sounds good to me, please go ahead and make these changes (including the 
> entry point name change). And thanks for the help with this.
>    -Paul
> 
> _______________________________________________
> 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