From 33bcc43fdf6cb2594d02c9bafafa8f1e2609730a Mon Sep 17 00:00:00 2001 From: Roman Gilg Date: Wed, 11 Dec 2019 04:24:05 +0100 Subject: [PATCH] [scenes/opengl] Remove glDrawBuffer call Summary: According to Gl 3.2 (page 501) and 4.5 (page 204) specs the initial state of the default framebuffer is already BACK. Therefore we do not need to set it explicitly. When we draw in the future to alternative framebuffers which do not have back buffers this call is fatal. Test Plan: No tearing on Wayland, tearing as before on X11. Reviewers: #kwin, davidedmundson Reviewed By: #kwin, davidedmundson Subscribers: kwin Tags: #kwin Differential Revision: https://phabricator.kde.org/D25868 --- plugins/scenes/opengl/scene_opengl.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/plugins/scenes/opengl/scene_opengl.cpp b/plugins/scenes/opengl/scene_opengl.cpp index 1953ab4b38..5c61a4ae2e 100644 --- a/plugins/scenes/opengl/scene_opengl.cpp +++ b/plugins/scenes/opengl/scene_opengl.cpp @@ -337,9 +337,6 @@ SceneOpenGL::SceneOpenGL(OpenGLBackend *backend, QObject *parent) init_ok = false; return; } - if (!glPlatform->isGLES() && !m_backend->isSurfaceLessContext()) { - glDrawBuffer(GL_BACK); - } m_debug = qstrcmp(qgetenv("KWIN_GL_DEBUG"), "1") == 0; initDebugOutput();