From 148bd9f232ff6df4f7db968fbafcd52daf61c6cd Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Mon, 8 Jun 2009 13:51:24 +0000 Subject: [PATCH] From Mathias Froehlich, "Without this change packed depth stencil attachments are only supported if the GL_EXT_framebuffer_blit extension is available. This is due to the early return from the constructor if this is missing. As far as I read the standard extension documents, this blit call is not required to have packed depth stencil fbos. The change fixes this and allows packed stencil attachments on machines without the multisample blit command." --- src/osg/FrameBufferObject.cpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/osg/FrameBufferObject.cpp b/src/osg/FrameBufferObject.cpp index 4432cf0d0..b240f0c96 100644 --- a/src/osg/FrameBufferObject.cpp +++ b/src/osg/FrameBufferObject.cpp @@ -94,19 +94,19 @@ FBOExtensions::FBOExtensions(unsigned int contextID) glFramebufferRenderbufferEXT != 0 && glGenerateMipmapEXT != 0; - if (!isGLExtensionSupported(contextID, "GL_EXT_framebuffer_blit")) - return; - - LOAD_FBO_EXT(glBlitFramebufferEXT); - - if (isGLExtensionSupported(contextID, "GL_EXT_framebuffer_multisample")) + if (isGLExtensionSupported(contextID, "GL_EXT_framebuffer_blit")) { - LOAD_FBO_EXT(glRenderbufferStorageMultisampleEXT); - } + LOAD_FBO_EXT(glBlitFramebufferEXT); - if (isGLExtensionSupported(contextID, "GL_NV_framebuffer_multisample_coverage")) - { - LOAD_FBO_EXT(glRenderbufferStorageMultisampleCoverageNV); + if (isGLExtensionSupported(contextID, "GL_EXT_framebuffer_multisample")) + { + LOAD_FBO_EXT(glRenderbufferStorageMultisampleEXT); + } + + if (isGLExtensionSupported(contextID, "GL_NV_framebuffer_multisample_coverage")) + { + LOAD_FBO_EXT(glRenderbufferStorageMultisampleCoverageNV); + } } if (isGLExtensionSupported(contextID, "GL_EXT_packed_depth_stencil"))