+const Version &get_gl_version()
+{
+ static Version version;
+ static bool init_done = false;
+
+ if(!init_done)
+ {
+ string gl_ver = reinterpret_cast<const char *>(glGetString(GL_VERSION));
+ vector<string> parts = split(gl_ver.substr(0, gl_ver.find(' ')), '.');
+ version.major = lexical_cast<unsigned>(parts[0]);
+ version.minor = lexical_cast<unsigned>(parts[1]);
+
+ init_done = true;
+ }
+
+ return version;
+}
+
+bool is_version_at_least(unsigned a, unsigned b)