diff --git a/auto/src/glew_init_gl.c b/auto/src/glew_init_gl.c index 3a30e58..fc3cc12 100644 --- a/auto/src/glew_init_gl.c +++ b/auto/src/glew_init_gl.c @@ -64,6 +64,8 @@ static GLenum GLEWAPIENTRY glewContextInit () const GLubyte* s; GLuint dot; GLint major, minor; + GLint context_flags = 0; + GLint context_profile = GL_CONTEXT_COMPATIBILITY_PROFILE_BIT; /* query opengl version */ s = glGetString(GL_VERSION); @@ -169,3 +171,12 @@ static GLenum GLEWAPIENTRY glewContextInit () free(begin); } } + + if( GLEW_VERSION_3_0 ) + glGetIntegerv(GL_CONTEXT_FLAGS, &context_flags); + if( GLEW_VERSION_3_2 ) + glGetIntegerv(GL_CONTEXT_PROFILE_MASK, &context_profile); + else if( GLEW_VERSION_3_1 && !glewGetExtension("GL_ARB_compatibility")) + context_profile = GL_CONTEXT_CORE_PROFILE_BIT; + + /* initialize core functions */ diff --git a/auto/src/glew_init_glx.c b/auto/src/glew_init_glx.c index d241e92..da8ecbe 100644 --- a/auto/src/glew_init_glx.c +++ b/auto/src/glew_init_glx.c @@ -17,6 +17,8 @@ GLenum glxewInit () int major, minor; const GLubyte* extStart; const GLubyte* extEnd; + GLint context_profile = 0, context_flags = 0; + /* initialize core GLX 1.2 */ if (_glewInit_GLX_VERSION_1_2()) return GLEW_ERROR_GLX_VERSION_11_ONLY; /* initialize flags */ diff --git a/auto/src/glew_init_wgl.c b/auto/src/glew_init_wgl.c index bd161be..eec5709 100644 --- a/auto/src/glew_init_wgl.c +++ b/auto/src/glew_init_wgl.c @@ -25,6 +25,8 @@ GLenum GLEWAPIENTRY wglewInit () GLboolean crippled; const GLubyte* extStart; const GLubyte* extEnd; + GLint context_profile = 0, context_flags = 0; + /* find wgl extension string query functions */ _wglewGetExtensionsStringARB = (PFNWGLGETEXTENSIONSSTRINGARBPROC)glewGetProcAddress((const GLubyte*)"wglGetExtensionsStringARB"); _wglewGetExtensionsStringEXT = (PFNWGLGETEXTENSIONSSTRINGEXTPROC)glewGetProcAddress((const GLubyte*)"wglGetExtensionsStringEXT");