1 #include <simgear/scene/material/GLPredicate.hxx>
4 #include <boost/bind.hpp>
6 #include <osg/GLExtensions>
13 using namespace boost;
15 bool GLPredicate::operator ()(unsigned int contextID)
17 float versionNumber = getGLVersionNumber() * 10.0f;
18 float required = (static_cast<float>(majorVersion) * 10.0f
19 + static_cast<float>(minorVersion));
20 if (versionNumber < required
21 && !osg::equivalent(versionNumber, required))
23 return (find_if(extensions.begin(), extensions.end(),
24 !bind(isGLExtensionSupported, contextID,
25 bind(&string::c_str, _1)))