1 #ifndef MSP_GL_EXTENSION_H_
2 #define MSP_GL_EXTENSION_H_
26 typedef SupportLevel (*InitFunc)();
31 mutable bool init_done;
32 mutable SupportLevel support;
35 Extension(const char *, InitFunc);
37 const char *get_name() const { return name; }
38 operator bool() const;
44 Require(const Extension &);
48 typedef void ExtFunc();
50 /** Indicates whether an extension is supported. */
51 bool is_supported(const std::string &);
53 /** Returns the OpenGL version number, as reported by the implementation. */
54 const Version &get_gl_version();
56 /** Indicates whether the OpenGL version is at least a.b. */
57 bool is_version_at_least(unsigned a, unsigned b);
59 /** Returns the address of an extension function. Only indended for internal
61 ExtFunc *get_proc_address(const std::string &);