diff --git a/libkwineffects/kwinglutils_funcs.cpp b/libkwineffects/kwinglutils_funcs.cpp index df5d7551a3..23a29367b3 100644 --- a/libkwineffects/kwinglutils_funcs.cpp +++ b/libkwineffects/kwinglutils_funcs.cpp @@ -96,9 +96,13 @@ void glResolveFunctions(OpenGLPlatformInterface platformInterface) } } else { if (haveArbRobustness) { - GLint value = 0; - glGetIntegerv(GL_CONTEXT_FLAGS, &value); - if (value & GL_CONTEXT_FLAG_ROBUST_ACCESS_BIT_ARB) { + if (hasGLVersion(3, 0)) { + GLint value = 0; + glGetIntegerv(GL_CONTEXT_FLAGS, &value); + if (value & GL_CONTEXT_FLAG_ROBUST_ACCESS_BIT_ARB) { + robustContext = true; + } + } else { robustContext = true; } } diff --git a/scene_opengl.cpp b/scene_opengl.cpp index 955782f315..4165998e7c 100644 --- a/scene_opengl.cpp +++ b/scene_opengl.cpp @@ -488,8 +488,10 @@ void SceneOpenGL::initDebugOutput() // empirical data shows extension doesn't work return; } + } else if (!hasGLVersion(3, 0)) { + return; } - // can only be queried with either OpenGL or OpenGL ES of at least 3.1 + // can only be queried with either OpenGL >= 3.0 or OpenGL ES of at least 3.1 GLint value = 0; glGetIntegerv(GL_CONTEXT_FLAGS, &value); if (!(value & GL_CONTEXT_FLAG_DEBUG_BIT)) {