From e326d0c75652b74316ef46f5a78f58fa07f32daf Mon Sep 17 00:00:00 2001 From: James Turner Date: Fri, 6 Dec 2013 18:03:35 +0000 Subject: [PATCH] Work around a clang/libc++ issue. --- simgear/scene/material/CMakeLists.txt | 2 -- simgear/scene/material/GLPredicate.cxx | 28 -------------------------- simgear/scene/material/GLPredicate.hxx | 25 ----------------------- 3 files changed, 55 deletions(-) delete mode 100644 simgear/scene/material/GLPredicate.cxx delete mode 100644 simgear/scene/material/GLPredicate.hxx diff --git a/simgear/scene/material/CMakeLists.txt b/simgear/scene/material/CMakeLists.txt index ba53896a..526fb7ed 100644 --- a/simgear/scene/material/CMakeLists.txt +++ b/simgear/scene/material/CMakeLists.txt @@ -3,7 +3,6 @@ set(HEADERS EffectBuilder.hxx EffectCullVisitor.hxx EffectGeode.hxx - GLPredicate.hxx Pass.hxx Technique.hxx TextureBuilder.hxx @@ -19,7 +18,6 @@ set(SOURCES EffectBuilder.cxx EffectCullVisitor.cxx EffectGeode.cxx - GLPredicate.cxx Pass.cxx Technique.cxx TextureBuilder.cxx diff --git a/simgear/scene/material/GLPredicate.cxx b/simgear/scene/material/GLPredicate.cxx deleted file mode 100644 index 2ff5fdaa..00000000 --- a/simgear/scene/material/GLPredicate.cxx +++ /dev/null @@ -1,28 +0,0 @@ -#include - -#include -#include - -#include -#include - -namespace simgear -{ -using namespace std; -using namespace osg; -using namespace boost; - -bool GLPredicate::operator ()(unsigned int contextID) -{ - float versionNumber = getGLVersionNumber() * 10.0f; - float required = (static_cast(majorVersion) * 10.0f - + static_cast(minorVersion)); - if (versionNumber < required - && !osg::equivalent(versionNumber, required)) - return false; - return (find_if(extensions.begin(), extensions.end(), - !bind(isGLExtensionSupported, contextID, - bind(&string::c_str, _1))) - == extensions.end()); -} -} diff --git a/simgear/scene/material/GLPredicate.hxx b/simgear/scene/material/GLPredicate.hxx deleted file mode 100644 index 9e90834d..00000000 --- a/simgear/scene/material/GLPredicate.hxx +++ /dev/null @@ -1,25 +0,0 @@ -#ifndef SIMGEAR_GLPREDICATE_HXX -#define SIMGEAR_GLPREDICATE_HXX 1 - -#include -#include - -namespace simgear -{ - -struct GLPredicate -{ - GLPredicate() : majorVersion(0),minorVersion(0) {} - GLPredicate(int majorVersion_, int minorVersion_) : - majorVersion(majorVersion_), minorVersion(minorVersion_) - { - } - /** Does OpenGL support the required version and extensions? - */ - bool operator ()(unsigned int contextID); - int majorVersion; - int minorVersion; - std::vector extensions; -}; -} -#endif -- 2.39.5