In the current SVN (240), multi-sampled render targets are broken, resulting in invalid pipeline and/or wrong depth resolve.
The first problem: The multisampled depth render buffer is not correctly initialized in egRendererBase.cpp, line 836:
Code:
glRenderbufferStorageMultisampleEXT( GL_RENDERBUFFER_EXT, rb.samples, tex.format, rb.width, rb.height );
tex.format is wrong, must be the _depthFormat (GL_DEPTH_COMPONENT16/24).
With this change, FBO setup will complete, so all fine here.
The next problem: the multisampled depth buffer is not correctly resolved when you want to bind it to a regular depth texture.
egRendererBase.cpp, line 917
Code:
glReadBuffer( GL_NONE );
glDrawBuffer( GL_NONE );
GL_NONE is wrong, as then no read/write buffer is bound, but actually we need GL_DEPTH_ATTACHMENT_EXT for both read/write.
I attached a patch (svn-diff to rev. 240 of egRendererBase.cpp) which fixes the problem, working both on Linux and OSX.
Alex