X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fextension.h;h=1b149367eecd7ef9c5978138a0a41a837ee7b9c4;hb=0ab875bdc9fbf84ecfce883b188410bb45882447;hp=85b4fc4af27e0418bf9d4c09932ad835899724f6;hpb=bd994b9a1376a021022e5145f30b7566e7923e4d;p=libs%2Fgl.git diff --git a/source/extension.h b/source/extension.h index 85b4fc4a..1b149367 100644 --- a/source/extension.h +++ b/source/extension.h @@ -29,6 +29,8 @@ struct Version Version(const std::string &); bool operator>=(const Version &) const; + bool operator<(const Version &o) const { return !(*this>=o); } + operator bool() const { return major || minor; } }; @@ -66,9 +68,17 @@ struct Require typedef void ExtFunc(); -/** Indicates whether an extension is supported. */ +/** Checks for extension support. Only intended for internal use. */ bool is_supported(const std::string &); +/** Checks for OpenGL version support. Only intended for internal use. */ +bool is_supported(const Version &, const Version & = Version()); + +/** Indicates whether an extension has been disabled, either explicitly through +the MSPGL_DISABLE_EXTENSIONS environment variable or implicitly as a workaround +for a driver bug. Only intended for internal use. */ +bool is_disabled(const std::string &); + /** Returns the API for which the library was compiled. */ GLApi get_gl_api(); @@ -81,9 +91,6 @@ 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); - /** Returns the address of an extension function. Only indended for internal use. */ ExtFunc *get_proc_address(const std::string &);