1 #ifndef MSP_GL_EXTENSION_H_
2 #define MSP_GL_EXTENSION_H_
28 Version(unsigned short, unsigned short);
29 Version(const std::string &);
31 bool operator>=(const Version &) const;
32 bool operator<(const Version &o) const { return !(*this>=o); }
46 typedef SupportLevel (*InitFunc)();
51 mutable bool init_done;
52 mutable SupportLevel support;
55 Extension(const char *, InitFunc);
57 const char *get_name() const { return name; }
58 operator bool() const;
64 Require(const Extension &);
68 typedef void ExtFunc();
70 /** Indicates whether an extension is supported. */
71 bool is_supported(const std::string &);
73 /** Returns the API for which the library was compiled. */
76 /** Returns the OpenGL profile for the active context. */
77 GLProfile get_gl_profile();
79 /** Returns the OpenGL version number, as reported by the implementation. */
80 const Version &get_gl_version();
82 /** Returns the GLSL version number, as reported by the implementation. */
83 const Version &get_glsl_version();
85 /** Indicates whether the OpenGL version is at least a.b. */
86 bool is_version_at_least(unsigned a, unsigned b);
88 /** Returns the address of an extension function. Only indended for internal
90 ExtFunc *get_proc_address(const std::string &);