From a2e214d3261053f32d9ffab31c1bf63a82a25fea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Sat, 4 Dec 2010 12:28:12 +0100 Subject: [PATCH] Enable PaintClipper on core VBO again. Need to disable clearing screen on EGL for that. With Mesa swapping buffer is sufficient, though a better solution will be required for other drivers --- lib/kwinglutils.cpp | 6 +++--- scene_opengl_egl.cpp | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/kwinglutils.cpp b/lib/kwinglutils.cpp index f8c3f7c469..0d3efa9d91 100644 --- a/lib/kwinglutils.cpp +++ b/lib/kwinglutils.cpp @@ -1298,13 +1298,13 @@ void GLVertexBufferPrivate::corePainting( const QRegion& region, GLenum primitiv // TODO: reenable paint clipper // Clip using scissoring - /*PaintClipper pc( region ); + PaintClipper pc( region ); for( PaintClipper::Iterator iterator; !iterator.isDone(); iterator.next()) - {*/ + { glDrawArrays( primitiveMode, 0, numberVertices ); - //} + } glBindBuffer( GL_ARRAY_BUFFER, 0 ); diff --git a/scene_opengl_egl.cpp b/scene_opengl_egl.cpp index 18c83ff543..febc7a28c6 100644 --- a/scene_opengl_egl.cpp +++ b/scene_opengl_egl.cpp @@ -229,8 +229,8 @@ void SceneOpenGL::paintGenericScreen( int mask, ScreenPaintData data ) void SceneOpenGL::paintBackground( QRegion region ) { // TODO: implement me - glClearColor(0, 0, 0, 1); - glClear(GL_COLOR_BUFFER_BIT); + //glClearColor(0, 0, 0, 1); + //glClear(GL_COLOR_BUFFER_BIT); } //****************************************