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