diff --git a/include/osg/GLExtensions b/include/osg/GLExtensions index 63e46538c..0b7864515 100644 --- a/include/osg/GLExtensions +++ b/include/osg/GLExtensions @@ -656,6 +656,8 @@ class OSG_EXPORT GLExtensions : public osg::Referenced // FrameBuferObject bool isFrameBufferObjectSupported; bool isPackedDepthStencilSupported; + bool isMultisampledRenderToTextureSupported; + bool isRenderbufferMultisampleSupported() const { return glRenderbufferStorageMultisample != 0; } bool isRenderbufferMultisampleCoverageSupported() const { return glRenderbufferStorageMultisampleCoverageNV != 0; } @@ -672,6 +674,7 @@ class OSG_EXPORT GLExtensions : public osg::Referenced void (GL_APIENTRY * glFramebufferTexture1D) (GLenum, GLenum, GLenum, GLuint, GLint); void (GL_APIENTRY * glFramebufferTexture2D) (GLenum, GLenum, GLenum, GLuint, GLint); + void (GL_APIENTRY * glFramebufferTexture2DMultisample) (GLenum, GLenum, GLenum, GLuint, GLint, GLsizei); void (GL_APIENTRY * glFramebufferTexture3D) (GLenum, GLenum, GLenum, GLuint, GLint, GLint); void (GL_APIENTRY * glFramebufferTexture) (GLenum, GLenum, GLint, GLint); void (GL_APIENTRY * glFramebufferTextureLayer) (GLenum, GLenum, GLuint, GLint, GLint); diff --git a/src/osg/GLExtensions.cpp b/src/osg/GLExtensions.cpp index c64c5995f..1c3bfe1a9 100644 --- a/src/osg/GLExtensions.cpp +++ b/src/osg/GLExtensions.cpp @@ -1090,6 +1090,7 @@ GLExtensions::GLExtensions(unsigned int in_contextID): setGLExtensionFuncPtr(glFramebufferTexture1D, "glFramebufferTexture1D", "glFramebufferTexture1DEXT", "glFramebufferTexture1DOES", validContext); setGLExtensionFuncPtr(glFramebufferTexture2D, "glFramebufferTexture2D", "glFramebufferTexture2DEXT", "glFramebufferTexture2DOES", validContext); + setGLExtensionFuncPtr(glFramebufferTexture2DMultisample, "glFramebufferTexture2DMultisample", "glFramebufferTexture2DMultisampleEXT", validContext); setGLExtensionFuncPtr(glFramebufferTexture3D, "glFramebufferTexture3D", "glFramebufferTexture3DEXT", "glFramebufferTexture3DOES", validContext); setGLExtensionFuncPtr(glFramebufferTexture, "glFramebufferTexture", "glFramebufferTextureEXT", "glFramebufferTextureOES", validContext); setGLExtensionFuncPtr(glFramebufferTextureLayer, "glFramebufferTextureLayer", "glFramebufferTextureLayerEXT", "glFramebufferTextureLayerOES", validContext); @@ -1129,6 +1130,8 @@ GLExtensions::GLExtensions(unsigned int in_contextID): (isGLExtensionSupported(contextID, "GL_EXT_packed_depth_stencil")) || (isGLExtensionSupported(contextID, "GL_OES_packed_depth_stencil"))); + isMultisampledRenderToTextureSupported = validContext && isGLExtensionSupported(contextID, "GL_EXT_multisampled_render_to_texture"); + //subroutine osg::setGLExtensionFuncPtr(glGetSubroutineUniformLocation, "glGetSubroutineUniformLocation", validContext); osg::setGLExtensionFuncPtr(glGetActiveSubroutineUniformName, "glGetActiveSubroutineUniformName", validContext);