diff --git a/src/osg/FrameBufferObject.cpp b/src/osg/FrameBufferObject.cpp index ec570d14e..ee06df812 100644 --- a/src/osg/FrameBufferObject.cpp +++ b/src/osg/FrameBufferObject.cpp @@ -105,7 +105,8 @@ FBOExtensions::FBOExtensions(unsigned int contextID) #if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) _supported = _supported && glFramebufferTexture1D != 0 && - glFramebufferTexture3D != 0; + glFramebufferTexture3D != 0 && + isGLExtensionOrVersionSupported(contextID, "GL_EXT_framebuffer_object",3.0f); #endif LOAD_FBO_EXT(glBlitFramebuffer); diff --git a/src/osg/Texture.cpp b/src/osg/Texture.cpp index 89eea7f53..3569d16f3 100644 --- a/src/osg/Texture.cpp +++ b/src/osg/Texture.cpp @@ -2351,7 +2351,7 @@ bool Texture::isHardwareMipmapGenerationEnabled(const State& state) const const FBOExtensions* fbo_ext = FBOExtensions::instance(contextID,true); - if (fbo_ext->glGenerateMipmap) + if (fbo_ext->isSupported() && fbo_ext->glGenerateMipmap) { return true; } @@ -2368,7 +2368,8 @@ Texture::GenerateMipmapMode Texture::mipmapBeforeTexImage(const State& state, bo return GENERATE_MIPMAP; #else - bool useGenerateMipMap = FBOExtensions::instance(state.getContextID(), true)->glGenerateMipmap!=0; + FBOExtensions* fbo_ext = FBOExtensions::instance(state.getContextID(),true); + bool useGenerateMipMap = fbo_ext->isSupported() && fbo_ext->glGenerateMipmap; if (useGenerateMipMap) { @@ -2440,7 +2441,7 @@ void Texture::generateMipmap(State& state) const osg::FBOExtensions* fbo_ext = osg::FBOExtensions::instance(state.getContextID(), true); // check if the function is supported - if (fbo_ext->glGenerateMipmap) + if (fbo_ext->isSupported() && fbo_ext->glGenerateMipmap) { textureObject->bind(); fbo_ext->glGenerateMipmap(textureObject->target());