2 #include <msp/strings/format.h>
11 GLOptions::GLOptions():
16 forward_compatible(false),
22 unsupported_gl_mode::unsupported_gl_mode(const GLOptions &opts):
23 runtime_error(format("{ .alpha=%s, .stencil=%s, .doublebuffer=%s, .multisample=%d, .forward_compatible=%s, .gl_version=%d.%d }",
24 opts.alpha, opts.stencil, opts.doublebuffer, opts.multisample, opts.forward_compatible, opts.gl_version_major, opts.gl_version_minor))
29 GLContext::GLContext(Window &wnd, const GLOptions &opts):
30 display(wnd.get_display()),
35 window.signal_resize.connect(sigc::mem_fun(this, &GLContext::window_resized));
39 void GLContext::platform_init(const GLOptions &)
41 throw runtime_error("no OpenGL support");
44 GLContext::~GLContext()
47 void GLContext::set_swap_interval(unsigned)
50 void GLContext::swap_buffers()
53 void GLContext::window_resized(unsigned, unsigned)
57 } // namespace Graphics