+enum GLApi
+{
+ OPENGL,
+ OPENGL_ES2
+};
+
+
+struct Version
+{
+ unsigned short major;
+ unsigned short minor;
+
+ Version();
+ Version(unsigned short, unsigned short);
+ Version(const std::string &);
+
+ bool operator>=(const Version &) const;
+};
+
+
+class Extension
+{
+public:
+ enum SupportLevel
+ {
+ UNSUPPORTED,
+ EXTENSION,
+ CORE
+ };
+
+ typedef SupportLevel (*InitFunc)();
+
+private:
+ const char *name;
+ InitFunc init_func;
+ mutable bool init_done;
+ mutable SupportLevel support;
+
+public:
+ Extension(const char *, InitFunc);
+
+ const char *get_name() const { return name; }
+ operator bool() const;
+};
+
+
+struct Require
+{
+ Require(const Extension &);
+};
+
+