doublebuffer(true),
multisample(0),
forward_compatible(false),
+ core_profile(false),
gl_version_major(0),
gl_version_minor(0)
{ }
unsupported_gl_mode::unsupported_gl_mode(const GLOptions &opts):
- runtime_error(format("{ .alpha=%s, .stencil=%s, .doublebuffer=%s, .multisample=%d, .forward_compatible=%s, .gl_version=%d.%d }",
- opts.alpha, opts.stencil, opts.doublebuffer, opts.multisample, opts.forward_compatible, opts.gl_version_major, opts.gl_version_minor))
+ runtime_error(format("{ .alpha=%s, .stencil=%s, .doublebuffer=%s, .multisample=%d, .forward_compatible=%s, .core_profile=%s, .gl_version=%d.%d }",
+ opts.alpha, opts.stencil, opts.doublebuffer, opts.multisample, opts.forward_compatible, opts.core_profile, opts.gl_version_major, opts.gl_version_minor))
{ }
ctx_attribs.push_back(GLX_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB);
}
+ if(opts.core_profile)
+ {
+ ctx_attribs.push_back(GLX_CONTEXT_PROFILE_MASK_ARB);
+ ctx_attribs.push_back(GLX_CONTEXT_CORE_PROFILE_BIT_ARB);
+ }
+
if(opts.gl_version_major)
{
ctx_attribs.push_back(GLX_CONTEXT_MAJOR_VERSION_ARB);
ctx_attribs.push_back(WGL_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB);
}
+ if(opts.core_profile)
+ {
+ ctx_attribs.push_back(WGL_CONTEXT_PROFILE_MASK_ARB);
+ ctx_attribs.push_back(WGL_CONTEXT_CORE_PROFILE_BIT_ARB);
+ }
+
if(opts.gl_version_major)
{
ctx_attribs.push_back(WGL_CONTEXT_MAJOR_VERSION_ARB);