1 #ifndef MSP_GL_EXTENSION_H_
2 #define MSP_GL_EXTENSION_H_
15 Version(unsigned short, unsigned short);
16 Version(const std::string &);
18 bool operator>=(const Version &) const;
32 typedef SupportLevel (*InitFunc)();
37 mutable bool init_done;
38 mutable SupportLevel support;
41 Extension(const char *, InitFunc);
43 const char *get_name() const { return name; }
44 operator bool() const;
50 Require(const Extension &);
54 typedef void ExtFunc();
56 /** Indicates whether an extension is supported. */
57 bool is_supported(const std::string &);
59 /** Returns the OpenGL version number, as reported by the implementation. */
60 const Version &get_gl_version();
62 /** Returns the GLSL version number, as reported by the implementation. */
63 const Version &get_glsl_version();
65 /** Indicates whether the OpenGL version is at least a.b. */
66 bool is_version_at_least(unsigned a, unsigned b);
68 /** Returns the address of an extension function. Only indended for internal
70 ExtFunc *get_proc_address(const std::string &);