From: Mikko Rasa Date: Sun, 6 Nov 2016 09:34:00 +0000 (+0200) Subject: Add a less-than operator to Version X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=commitdiff_plain;h=5b3aa68610238de4e6f13c4bf9ec1745751e820c Add a less-than operator to Version --- diff --git a/source/extension.cpp b/source/extension.cpp index 78fc7e1c..fda183d2 100644 --- a/source/extension.cpp +++ b/source/extension.cpp @@ -105,7 +105,7 @@ bool is_supported(const string &ext) /* AMD's uniform buffer objects only work with the core version of shaders. */ - if(!(get_gl_version()>=Version(2, 0))) + if(get_gl_version()=(const Version &) const; + bool operator<(const Version &o) const { return !(*this>=o); } }; diff --git a/source/programbuilder.cpp b/source/programbuilder.cpp index affc4cc3..e4739da0 100644 --- a/source/programbuilder.cpp +++ b/source/programbuilder.cpp @@ -782,9 +782,9 @@ ProgramBuilder::StandardFeatures::StandardFeatures(): geometry(false) { if(get_gl_api()==OPENGL_ES2) - legacy = !(get_glsl_version()>=Version(3, 0)); + legacy = get_glsl_version()=Version(1, 30)); + legacy = get_glsl_version()