]> git.tdb.fi Git - libs/gui.git/blobdiff - source/graphics/glx/glcontext.cpp
Add a core profile flag to OpenGL context options
[libs/gui.git] / source / graphics / glx / glcontext.cpp
index 54541e969802216d19b51fe79ee40d05555c0471..3ee8865d7559e0890df797cb79ef893097f50847 100644 (file)
@@ -114,6 +114,12 @@ void GLContext::platform_init(const GLOptions &opts)
                                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);