1 #ifndef MSP_GRAPHICS_GLCONTEXT_H_
2 #define MSP_GRAPHICS_GLCONTEXT_H_
5 #include "mspgui_api.h"
15 static constexpr unsigned DEFAULT_VERSION = 0;
16 static constexpr unsigned LATEST_VERSION = 0xFFFFFFFF;
20 bool doublebuffer = true;
21 unsigned multisample = 0;
22 bool forward_compatible = false;
23 bool core_profile = false;
24 unsigned gl_version_major = DEFAULT_VERSION;
25 unsigned gl_version_minor = DEFAULT_VERSION;
29 class MSPGUI_API unsupported_gl_mode: public std::runtime_error
32 unsupported_gl_mode(const GLOptions &);
35 static std::string format_version(const GLOptions &);
39 class MSPGUI_API GLContext
46 Private *priv = nullptr;
49 GLContext(Window &wnd, const GLOptions &opts = GLOptions());
50 GLContext(Window &wnd, unsigned, unsigned);
52 void platform_init(const GLOptions &);
56 void set_swap_interval(unsigned);
60 void window_resized(unsigned, unsigned);
63 } // namespace Graphics