From 43e5456df27ff8d906be791e3aae6825575aa273 Mon Sep 17 00:00:00 2001
From: eihrul <eihrul@d7cf8633-e32d-0410-b094-e92efae38249>
Date: Wed, 6 Jan 2010 19:29:45 +0000
Subject: [PATCH] only clear depth buffer bit for shadowmaps

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@9797 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=56b2babbc308954817d459ffc6732bb9aa6d852c
---
 r_shadow.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/r_shadow.c b/r_shadow.c
index 0625b1ce..aa8ebe06 100644
--- a/r_shadow.c
+++ b/r_shadow.c
@@ -2210,7 +2210,7 @@ init_done:
 			int y1 = clear & 0x03 ? 0 : (clear & 0xC ? size : 2 * size);
 			int y2 = clear & 0x30 ? 3 * size : (clear & 0xC ? 2 * size : size);
 			GL_Scissor(x1, y1, x2 - x1, y2 - y1);
-			GL_Clear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT |  GL_STENCIL_BUFFER_BIT);
+			GL_Clear(GL_DEPTH_BUFFER_BIT);
 		}
 		GL_Scissor(viewport.x, viewport.y, viewport.width, viewport.height);
 	}
@@ -2219,7 +2219,7 @@ init_done:
 		qglFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, GL_DEPTH_ATTACHMENT_EXT, GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB + side, R_GetTexture(r_shadow_shadowmapcubetexture[r_shadow_shadowmaplod]), 0);CHECKGLERROR
 		GL_Scissor(viewport.x, viewport.y, viewport.width, viewport.height);
 		if (clear)
-			GL_Clear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT |  GL_STENCIL_BUFFER_BIT);
+			GL_Clear(GL_DEPTH_BUFFER_BIT);
 	}
 	CHECKGLERROR
 }
-- 
2.39.5