X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fgraphics%2Fglcontext.h;h=986dd91e9642cb68832a3d5021d9b66cc9ff7d5a;hb=2ed9d7a0a96638bdf0614c1cf858719e7ced40d3;hp=8cf75c82948fc657869e1d3685dbfcfeb4133233;hpb=213ca43656411a06bbf1c0d18e4ebacaf545eb34;p=libs%2Fgui.git diff --git a/source/graphics/glcontext.h b/source/graphics/glcontext.h index 8cf75c8..986dd91 100644 --- a/source/graphics/glcontext.h +++ b/source/graphics/glcontext.h @@ -11,10 +11,20 @@ class Window; struct GLOptions { + enum + { + DEFAULT_VERSION = 0, + LATEST_VERSION = 0xFFFFFFFF + }; + bool alpha; bool stencil; bool doublebuffer; unsigned multisample; + bool forward_compatible; + bool core_profile; + unsigned gl_version_major; + unsigned gl_version_minor; GLOptions(); }; @@ -24,7 +34,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 &); }; @@ -39,6 +51,7 @@ private: public: GLContext(Window &wnd, const GLOptions &opts = GLOptions()); + GLContext(Window &wnd, unsigned, unsigned); private: void platform_init(const GLOptions &); public: