2 #include <msp/strings/format.h>
11 GLOptions::GLOptions():
16 forward_compatible(false),
23 unsupported_gl_mode::unsupported_gl_mode(const GLOptions &opts):
24 runtime_error(format("{ .alpha=%s, .stencil=%s, .doublebuffer=%s, .multisample=%d, .forward_compatible=%s, .core_profile=%s, .gl_version=%d.%d }",
25 opts.alpha, opts.stencil, opts.doublebuffer, opts.multisample, opts.forward_compatible, opts.core_profile, opts.gl_version_major, opts.gl_version_minor))
30 GLContext::GLContext(Window &wnd, const GLOptions &opts):
31 display(wnd.get_display()),
36 window.signal_resize.connect(sigc::mem_fun(this, &GLContext::window_resized));
40 void GLContext::platform_init(const GLOptions &)
42 throw runtime_error("no OpenGL support");
45 GLContext::~GLContext()
48 void GLContext::set_swap_interval(unsigned)
51 void GLContext::swap_buffers()
54 void GLContext::window_resized(unsigned, unsigned)
58 } // namespace Graphics