Jonathan Richard wrote on Tuesday, June 30, 2009 10:36 AM: >> 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'm not sure about the result of the glBlitFramebuffer operation...what is > the result of this copy? Is it the original FBO without beeing multisampled?
The result is an FBO without multisampling whose buffers are filled by combining the multiple samples from the multisample FBO together. >> If you just want to render to multisample buffers and never need to read >> back from those buffers (such as in a shader), you can do it; otherwise, >> I think you are out of luck. > > What do you mean by never need to read back from those buffers such as in a > shader? You can render to multisample buffers, but to use the results in a shader or read back the data for use on the CPU, you must resolve them to a non-multisample form (Image or Texture). For example, if you render your scene to a depth buffer using a FBO, you either attach a (non-multisample) Texture, or you can attach a multisample RenderBuffer. If you want to use the latter depth buffer in a shader, you need to blit it to another FBO with a Texture attached, at which point it will no longer be multisampled. > In the release note of osg 2.6.1 it says: > OpenGL Multi-sample FrameBufferObject support. In fact what does it means? I > do not really undestand in what configuration the multisample FBO can be > used. It means you can render to multisample RenderBuffers. This is useful because now you can (for example) render to a multisample depth buffer in FBO and then use that as the depth buffer for the actual scene render, whereas before if you used an FBO, you could only get a non-multisample depth buffer (which causes problems when your actual scene render is multisampled). I haven't tried that particular usage (and again, I'm not an expert), though. HTH, -- Bryan Thrall FlightSafety International [email protected] _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

