+struct Version
+{
+ unsigned short major;
+ unsigned short minor;
+};
+
+
+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 &);
+};
+
+