]> git.tdb.fi Git - libs/gui.git/blobdiff - source/graphics/glcontext.h
Add support for using the latest available OpenGL version
[libs/gui.git] / source / graphics / glcontext.h
index ef6ef1b60f25989431e4d710c5916a84bdc64af1..f6357c3cce475513df04dc276a101d79bba42a15 100644 (file)
@@ -11,6 +11,12 @@ class Window;
 
 struct GLOptions
 {
+       enum
+       {
+               DEFAULT_VERSION = 0,
+               LATEST_VERSION = 0xFFFFFFFF
+       };
+
        bool alpha;
        bool stencil;
        bool doublebuffer;
@@ -29,6 +35,9 @@ class unsupported_gl_mode: public std::runtime_error
 public:
        unsupported_gl_mode(const GLOptions &);
        virtual ~unsupported_gl_mode() throw () { }
+
+private:
+       static std::string format_version(const GLOptions &);
 };
 
 
@@ -43,6 +52,7 @@ private:
 
 public:
        GLContext(Window &wnd, const GLOptions &opts = GLOptions());
+       GLContext(Window &wnd, unsigned, unsigned);
 private:
        void platform_init(const GLOptions &);
 public: