Jonathan Richard wrote on Tuesday, June 30, 2009 3:09 PM:

>> The result is an FBO without multisampling whose buffers are filled
by
>> combining the multiple samples from the multisample FBO together.
> 
> Ok so the FBO multisampling is supported but not directly as it said
on
> http://www.opengl.org/wiki/GL_EXT_framebuffer_object_More_about_FBOs
> 
> "Are multisample Render_To_Texture (RTT) supported? Not directly. You
need
> GL_EXT_framebuffer_multisample and you would have to copy the contents
of the
> AA-FBO to a standard RTT."  
> 
>>> you have to use glBlitFramebuffer to
>>> copy the multisample FBO to a FBO without multisampling to resolve
the
>>> samples to a texture; this is what osgUtil::RenderStage does when
you
>>> attach an osg::Texture and set the samples to > 1.
> 
> I looked at the code in the osgUtil::RenderStage::DrawInner method but
it
> seems to depend on a call of the
>
osgUtil::RenderStage::setMultisampleResolveFramebufferObject(osg::FrameB
ufferObject*
> fbo) that seems to be never called. Does it means that I have to call
it by
> myself? Maybe I could perform the blit by myselft instead of calling
this
> method? I saw an old post about that (see the post named Setting the
resolve
> FBO for multisampled RTT on 8/27/08)  but it was not clear what to do.


You do not have to call setMultisampleResolveFramebufferObject().

See RenderStage::runCameraSetUp(), which handles cameras with
attachments. In particular, _resolveFbo is set due to multisampling on
line 495 or so. The blit happens on line 910.

-- 
Bryan Thrall
FlightSafety International
[email protected]
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to