1 #ifndef MSP_GL_EXTENSION_H_
2 #define MSP_GL_EXTENSION_H_
22 Version(unsigned short, unsigned short);
23 Version(const std::string &);
25 bool operator>=(const Version &) const;
39 typedef SupportLevel (*InitFunc)();
44 mutable bool init_done;
45 mutable SupportLevel support;
48 Extension(const char *, InitFunc);
50 const char *get_name() const { return name; }
51 operator bool() const;
57 Require(const Extension &);
61 typedef void ExtFunc();
63 /** Indicates whether an extension is supported. */
64 bool is_supported(const std::string &);
66 /** Returns the API for which the library was compiled. */
69 /** Returns the OpenGL version number, as reported by the implementation. */
70 const Version &get_gl_version();
72 /** Returns the GLSL version number, as reported by the implementation. */
73 const Version &get_glsl_version();
75 /** Indicates whether the OpenGL version is at least a.b. */
76 bool is_version_at_least(unsigned a, unsigned b);
78 /** Returns the address of an extension function. Only indended for internal
80 ExtFunc *get_proc_address(const std::string &);