]> git.mxchange.org Git - simgear.git/commitdiff
Work around a clang/libc++ issue.
authorJames Turner <zakalawe@mac.com>
Fri, 6 Dec 2013 18:03:35 +0000 (18:03 +0000)
committerJames Turner <zakalawe@mac.com>
Fri, 6 Dec 2013 18:03:35 +0000 (18:03 +0000)
simgear/scene/material/CMakeLists.txt
simgear/scene/material/GLPredicate.cxx [deleted file]
simgear/scene/material/GLPredicate.hxx [deleted file]

index ba53896aa086e6d5d1fc6b86dedc92fd98afdf02..526fb7edddf41ccb3e27580859bcb63a09f34b9c 100644 (file)
@@ -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 (file)
index 2ff5fda..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-#include <simgear/scene/material/GLPredicate.hxx>
-
-#include <algorithm>
-#include <boost/bind.hpp>
-
-#include <osg/GLExtensions>
-#include <osg/Math>
-
-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<float>(majorVersion) * 10.0f
-                      + static_cast<float>(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 (file)
index 9e90834..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-#ifndef SIMGEAR_GLPREDICATE_HXX
-#define SIMGEAR_GLPREDICATE_HXX 1
-
-#include <vector>
-#include <string>
-
-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<const std::string *> extensions;
-};
-}
-#endif