1 #ifndef MSP_GRAPHICS_GLCONTEXT_H_
2 #define MSP_GRAPHICS_GLCONTEXT_H_
14 static constexpr unsigned DEFAULT_VERSION = 0;
15 static constexpr unsigned LATEST_VERSION = 0xFFFFFFFF;
19 bool doublebuffer = true;
20 unsigned multisample = 0;
21 bool forward_compatible = false;
22 bool core_profile = false;
23 unsigned gl_version_major = DEFAULT_VERSION;
24 unsigned gl_version_minor = DEFAULT_VERSION;
28 class unsupported_gl_mode: public std::runtime_error
31 unsupported_gl_mode(const GLOptions &);
34 static std::string format_version(const GLOptions &);
48 GLContext(Window &wnd, const GLOptions &opts = GLOptions());
49 GLContext(Window &wnd, unsigned, unsigned);
51 void platform_init(const GLOptions &);
55 void set_swap_interval(unsigned);
59 void window_resized(unsigned, unsigned);
62 } // namespace Graphics