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;
45 typedef SupportLevel (*InitFunc)();
50 mutable bool init_done;
51 mutable SupportLevel support;
54 Extension(const char *, InitFunc);
56 const char *get_name() const { return name; }
57 operator bool() const;
63 Require(const Extension &);
67 typedef void ExtFunc();
69 /** Indicates whether an extension is supported. */
70 bool is_supported(const std::string &);
72 /** Returns the API for which the library was compiled. */
75 /** Returns the OpenGL profile for the active context. */
76 GLProfile get_gl_profile();
78 /** Returns the OpenGL version number, as reported by the implementation. */
79 const Version &get_gl_version();
81 /** Returns the GLSL version number, as reported by the implementation. */
82 const Version &get_glsl_version();
84 /** Indicates whether the OpenGL version is at least a.b. */
85 bool is_version_at_least(unsigned a, unsigned b);
87 /** Returns the address of an extension function. Only indended for internal
89 ExtFunc *get_proc_address(const std::string &);