From 8d77126e2e66993736f74bbee68c97e496bf4688 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Fri, 22 Jul 2011 09:27:41 +0000 Subject: [PATCH] From Alexander Irion, "Texture borders are not supported in ES. _isTextureBorderClampSupported is set to "TRUE" in Texture.cpp, because of the version number check (GL VERSION >= 1.3). This leads to an invalid enum error, when GL_TEXTURE_BORDER_COLOR is tried to set. " --- src/osg/Texture.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/osg/Texture.cpp b/src/osg/Texture.cpp index 6f4c14f9d..a452a6d0d 100644 --- a/src/osg/Texture.cpp +++ b/src/osg/Texture.cpp @@ -94,7 +94,7 @@ void Texture::TextureObject::setAllocated(GLint numMipmapLevels, // Update texture pool size _set->getParent()->getCurrTexturePoolSize() -= previousSize; _set->getParent()->getCurrTexturePoolSize() += _profile._size; - } + } } } @@ -2479,7 +2479,9 @@ Texture::Extensions::Extensions(unsigned int contextID) isGLExtensionOrVersionSupported(contextID,"GL_EXT_texture_edge_clamp", 1.2f) || isGLExtensionOrVersionSupported(contextID,"GL_SGIS_texture_edge_clamp", 1.2f); - _isTextureBorderClampSupported = OSG_GL3_FEATURES || isGLExtensionOrVersionSupported(contextID,"GL_ARB_texture_border_clamp", 1.3f); + + _isTextureBorderClampSupported = OSG_GL3_FEATURES || + ((OSG_GL1_FEATURES || OSG_GL2_FEATURES) && isGLExtensionOrVersionSupported(contextID,"GL_ARB_texture_border_clamp", 1.3f)); _isGenerateMipMapSupported = builtInSupport || isGLExtensionOrVersionSupported(contextID,"GL_SGIS_generate_mipmap", 1.4f);