kwin: Create a vertex array object in SceneOpenGL2
Using a vertex array object is not optional in an OpenGL core context.
This commit is contained in:
parent
2bcad53bbb
commit
d324ec998a
2 changed files with 12 additions and 0 deletions
|
@ -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()
|
||||
|
|
|
@ -126,6 +126,7 @@ private:
|
|||
private:
|
||||
LanczosFilter *m_lanczosFilter;
|
||||
ColorCorrection *m_colorCorrection;
|
||||
GLuint vao;
|
||||
};
|
||||
|
||||
#ifdef KWIN_HAVE_OPENGL_1
|
||||
|
|
Loading…
Reference in a new issue