]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
only clear depth buffer bit for shadowmaps
authoreihrul <eihrul@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 6 Jan 2010 19:29:45 +0000 (19:29 +0000)
committerRudolf Polzer <divVerent@alientrap.org>
Wed, 6 Jan 2010 20:13:09 +0000 (21:13 +0100)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@9797 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=56b2babbc308954817d459ffc6732bb9aa6d852c

r_shadow.c

index 0625b1cee129cd95c0e4e165f78b53598ef17148..aa8ebe06ae2a3e78c6f2cfeff462a08b4590df58 100644 (file)
@@ -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
 }