return version;
}
+inline Version _get_glsl_version()
+{
+ string glsl_ver = reinterpret_cast<const char *>(glGetString(GL_SHADING_LANGUAGE_VERSION));
+ return Version(glsl_ver.substr(0, glsl_ver.find(' ')));
+}
+
+const Version &get_glsl_version()
+{
+ static Version version = _get_glsl_version();
+ return version;
+}
+
bool is_version_at_least(unsigned a, unsigned b)
{
return get_gl_version()>=Version(a, b);
/** Returns the OpenGL version number, as reported by the implementation. */
const Version &get_gl_version();
+/** Returns the GLSL version number, as reported by the implementation. */
+const Version &get_glsl_version();
+
/** Indicates whether the OpenGL version is at least a.b. */
bool is_version_at_least(unsigned a, unsigned b);