diff --git a/scene_opengl.cpp b/scene_opengl.cpp index 9c1e98ca4a..889f07e0c3 100644 --- a/scene_opengl.cpp +++ b/scene_opengl.cpp @@ -617,7 +617,18 @@ SceneOpenGL2::SceneOpenGL2(OpenGLBackend *backend) init_ok = false; return; // error } + kDebug(1212) << "OpenGL 2 compositing successfully initialized"; + +#ifndef KWIN_HAVE_OPENGLES + // It is not legal to not have a vertex array object bound in a core context + if (hasGLExtension("GL_ARB_vertex_array_object")) { + glGenVertexArrays(1, &vao); + glBindVertexArray(vao); + } +#endif + + init_ok = true; } SceneOpenGL2::~SceneOpenGL2() diff --git a/scene_opengl.h b/scene_opengl.h index 774057dc3c..cb01664ea4 100644 --- a/scene_opengl.h +++ b/scene_opengl.h @@ -126,6 +126,7 @@ private: private: LanczosFilter *m_lanczosFilter; ColorCorrection *m_colorCorrection; + GLuint vao; }; #ifdef KWIN_HAVE_OPENGL_1