From ea17b3562cc5ca1b68a6995ae6690e840d1b7a03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Wed, 30 Mar 2011 20:32:27 +0200 Subject: [PATCH] Add debug rendering for shadow code --- scene_opengl.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/scene_opengl.cpp b/scene_opengl.cpp index 0a79312b53..07f1c87953 100644 --- a/scene_opengl.cpp +++ b/scene_opengl.cpp @@ -687,6 +687,13 @@ void SceneOpenGL::Window::paintShadow(WindowQuadType type, const QRegion ®ion renderQuads(0, region, quads); restoreStates(Shadow, data.opacity, data.brightness, data.saturation, data.shader, texture); texture->unbind(); +#ifndef KWIN_HAVE_OPENGLES + if (static_cast(scene)->debug) { + glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); + renderQuads(0, region, quads); + glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); + } +#endif } void SceneOpenGL::Window::makeDecorationArrays(const WindowQuadList& quads, const QRect& rect) const