X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fgraphics%2Fglcontext.h;h=38c36b109d9bfc0f14b3dcbbb6240d68fd6ff203;hb=d7686e3867e3c68cec0d3767a21f9d2408383085;hp=7f08f0e4026423e7d1b3b7c3dd657eae0ff781b1;hpb=294c354ae3b1f26887c37f866f082e52c08d80f1;p=libs%2Fgui.git diff --git a/source/graphics/glcontext.h b/source/graphics/glcontext.h index 7f08f0e..38c36b1 100644 --- a/source/graphics/glcontext.h +++ b/source/graphics/glcontext.h @@ -2,6 +2,7 @@ #define MSP_GRAPHICS_GLCONTEXT_H_ #include +#include "mspgui_api.h" namespace Msp { namespace Graphics { @@ -11,11 +12,8 @@ class Window; struct GLOptions { - enum - { - DEFAULT_VERSION = 0, - LATEST_VERSION = 0xFFFFFFFF - }; + static constexpr unsigned DEFAULT_VERSION = 0; + static constexpr unsigned LATEST_VERSION = 0xFFFFFFFF; bool alpha = false; bool stencil = false; @@ -28,7 +26,7 @@ struct GLOptions }; -class unsupported_gl_mode: public std::runtime_error +class MSPGUI_API unsupported_gl_mode: public std::runtime_error { public: unsupported_gl_mode(const GLOptions &); @@ -38,14 +36,14 @@ private: }; -class GLContext +class MSPGUI_API GLContext { private: struct Private; Display &display; Window &window; - Private *priv = 0; + Private *priv = nullptr; public: GLContext(Window &wnd, const GLOptions &opts = GLOptions());